COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-55
DIVIDE GIVING REMAINDER
DIVIDE GIVING REMAINDER
DIVIDE GIVING REMAINDER divides one data item into another data item and stores
the quotient and remainder in specified data items.
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 the dividend.
quotient
is the identifier of the elementary numeric item or elementary numeric edited data
item in which the quotient is to be stored.
ROUNDED
specifies that quotient is to be rounded before being stored.
DIVIDE
quotient
ROUNDED
divisor
dividend
REMAINDER
remainder
END-DIVIDE
ON
SIZE ERROR
NOT
ON
SIZE
ERROR
imperative-stmt-2
imperative-stmt-1
INTO
dividend
BY
divisor
GIVING
VST147.vsd