COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-52
DIVIDE INTO
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.
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.