*---------*---------------*-----------------*----------------*---------------* | CODE | FACTOR 1 | FACTOR 2 | RESULT | INDICATORS | | | | | FIELD | | *---------*---------------*-----------------*----------------*---------------* | MVR | | | Remainder | + - Z | *---------*---------------*-----------------*----------------*---------------*
The MVR operation moves the remainder from the previous DIV operation to a separate field named in the result field. Factor 1 and factor 2 must be blank. The MVR operation must immediately follow the DIV operation. If you use conditioning indicators, ensure that the MVR operation is processed immediately after the DIV operation. If the MVR operation is processed before the DIV operation, undesirable results occur. The result field must be numeric and can contain one of: an array, array element, subfield, or table name.
Leave sufficient room in the result field if the DIV operation uses factors with decimal positions. The number of significant decimal positions is the greater of:
The sign (+ or -) of the remainder is the same as the dividend (factor 1).
You cannot specify half adjust (position 53) on a DIV operation that is immediately followed by an MVR operation.
The maximum number of whole number positions in the remainder is equal to the whole number of positions in factor 2 of the previous divide operation.
The MVR operation cannot be used if the previous divide operation has an array specified in the result field.
For further information on the MVR operation, see Arithmetic Operations.
See Figure "Summary of Arithmetic Operations" for an example of the MVR operation.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.