The COMPUTE statement calculates the value of an arithmetic expression and assigns the value to one or more data items.
identifier-1 must refer to either an elementary numeric item or an elementary numeric edited item.
An arithmetic expression consisting of a single identifier or literal provides a method of setting the value of identifier-1 equal to the value of the single identifier or literal.
The COMPUTE statement allows the user to combine arithmetic operations without the restrictions on composite of operands, receiving data items, or both, imposed by the arithmetic statements ADD, SUBTRACT, MULTIPLY and DIVIDE.
Additional rules and explanations regarding features of the COMPUTE statement that are common to other arithmetic statements can be found in the discussion of common rules. See in particular the discussions of the ROUNDED phrase, the size error condition, overlapping operands, modes of operation, composite size, and incompatible data.
COMPUTE Statement Examples
COBOL Related Interview Questions
|VSAM Interview Questions||IBM - VSAM Interview Questions|
|IBM-CICS Interview Questions||JCL Interview Questions|
|IBM DB2 Interview Questions||IBM-JCL Interview Questions|
|DB2 Using SQL Interview Questions||IBM-JCL&VSAM Interview Questions|
|IBM Mainframe Interview Questions||COBOL, CICS, JCL, VSAM, DB2 Interview Questions|
|DB2 SQL Programming Interview Questions||IMS/DB Interview Questions|
|Mainframe DB2 Interview Questions|
Procedure Division Statements
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.