Previous Topic: Example

Next Topic: Duration

Divide with Remainder

The *DIV WITH REMAINDER built-in function specifies an arithmetic division of two fields with the remainder being stored in an additional field.

There are four parameters for this function type:

All parameters must be numeric field types.

CA 2E implements the *DIV WITH REMAINDER built-in function as an RPG MVR statement, and as a COBOL DIVIDE statement followed by a COBOL MOVE statement.