COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
divisor
is the identifier of the elementary numeric data item or numeric literal that is the divisor.
dividend
is the identifier of an elementary numeric data item that is both the dividend and the receiver
of the quotient.
ROUNDED
specifies that quotient is to be rounded before being stored.
imperative-stmt-1
is an imperative statement for the process to execute if it detects a size error in the division or
in storing the result.
imperative-stmt-2
is an imperative statement for the process to execute if it does not detect a size error in the
division or in storing the result.
END-DIVIDE
ends the scope of the DIVIDE statement and makes it a delimited-scope statement. If you omit
END-DIVIDE but include the SIZE ERROR or NOT SIZE ERROR phrase, the DIVIDE statement is
a conditional statement and ends at the next period separator.
Usage Considerations:
• Mathematics
The statement
DIVIDE A INTO B
means store B /A in B.
• Precision
For information on the precision of HP COBOL division, see Arithmetic Precision (page 261).
• Order of Evaluation
The value of divisor is copied into a temporary data item for computation. The value of
each dividend is divided by the value of the temporary data item and the value of the result
is stored (after rounding, if specified) into dividend. If the same data name occurs more
than once in the list of dividends, the final value of the item reflects multiple divisions by the
value of divisor.
Each time the result is stored in a dividend, the process of operand identification (including
subscript evaluation and reference modification) occurs just before the storage operation.
DIVIDE GIVING
DIVIDE GIVING divides one data item into another data item and stores the quotient in one or
more data items.
DIVIDE 315










