Previous Topic: Modulo

Next Topic: *MOVE ARRAY Built-in Function

Move

The *MOVE built-in function specifies that the value of one field is to be moved to another.

There are two parameters for this function type:

For all but date and time fields, the moved and result fields must either both be numeric or both be alphanumeric field types. Refer to Considerations for Date and Time Field Types at the end of this topic for details about date and time conversions.

Note: If CND is specified for the context of *FACTOR2 and the field is a status field, the condition must be a VAL condition. If the field is not a status field and CND is specified, the condition must be a CMP condition with an operation of EQ.

CA 2E implements the *MOVE built-in function as an RPG Z-ADD statement for numeric fields and as a MOVEL statement for alphanumeric fields; in COBOL CA 2E implements the *MOVE function as a MOVE statement.

Example

This is an example of the *MOVE built-in function.

> USER: Process subfile record .-- : Execute another function <<< : PGM. *Reload subfile = CND. *Yes <<< ’--