The move operations are:
Move operations transfer all or part of factor 2 to the result field. Factor 2 remains unchanged. Factor 1 must be blank. Resulting indicators can be specified in positions 54 through 59., except for the MOVE and MOVEL operations if the result field is an array, or for the MOVEA operation if the result field is an array or array element.
In the move operations, factor 2 and the result field are generally of the same type (both numeric or both character). However, you can use the move operations to change numeric fields to character fields and character fields to numeric fields. To change a numeric field to a character field, enter the name of the numeric field in factor 2 and specify a character result field. To change a character field to a numeric field, enter the name of the character field in factor 2 and specify a numeric result field.
When a character field is moved into a numeric result field, the digit portion of each character is converted to its corresponding numeric character and then moved to the result field. Blanks are transferred as zeros. For the MOVE operation, the zone portion of the rightmost character is converted to its corresponding sign and moved to the rightmost position of the numeric result field. It becomes the sign of the field. (See Figure "MOVE Operation" for an example.) For the MOVEL operation, the zone portion of the rightmost character of factor 2 is converted and used as the sign of the result field (unless factor 2 is shorter than the result field) whether or not the rightmost character is included in the move operation. (See Figure "MOVEL Operation" for an example.)
If move operations are specified to move data into numeric fields, the decimal positions specified for the factor 2 field are ignored. For example, if 1.00 is moved into a three-position numeric field with one decimal position, the result is 10.0.
If you specify P in position 53 for a move operation, the result field is padded from the right for MOVEL and MOVEA and from the left for MOVE. The pad characters are blank for character, 0 for numeric and '0' for indicator. The padding takes place after the operation. If you use MOVE or MOVEL to move a field to an array, each element of the array will be padded. If you use these operations to move an array to an array and the result contains more elements than the factor 2 array, the same padding takes place but the extra elements are not affected. A MOVEA operation with an array name in the result field will pad the last element affected by the operation plus all subsequent elements.
When resulting indicators are specified for move operations, the result field determines which indicator is set on. If the result field is a character field, only the resulting indicator in positions 58 and 59 can be specified. This indicator is set on if the result field is all blanks. When the result field is numeric, all three resulting indicator positions may be used. These indicators are set on as follows:
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.