COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
size is equal to the number of 9s in the PICTURE clause. If its USAGE is not DISPLAY, it is
converted to DISPLAY for the move operation. For example:
PIC 999V99 VALUE 123.45
is treated as if it were PIC X(5); that is, as the value 12345.
If the number of digits in sender is greater than 18 (for example, when a NUMVAL function
is used), the leftmost 18 digits are moved and any to the right of this are discarded.
The COBOL standard requires that the numeric item have no decimal positions. HP allows this
as an extension.
If an elementary receiver is described as JUSTIFIED, see JUSTIFIED Clause (page 218).
• Numeric or Numeric Edited Receiving Data Items
Data is aligned by decimal point and filled with zeros as necessary.
If receiver is signed, the sign of sender is moved to receiver. If sender has no sign,
the new sign of receiver is positive.
If receiver is not signed, the absolute value of sender becomes the new value of receiver.
If sender is alphanumeric, its value is treated as an unsigned numeric integer.
If sender is numeric-edited, the operand’s unedited numeric value is determined (it can be
signed). The unedited numeric value of sender is moved to receiver.
• Group MOVE Statements
Group MOVE statements (MOVE statements in which sender, receiver, or both are data
structures) are treated as alphanumeric-to-alphanumeric moves, with no data conversion.
Receiving items are filled without regard to individual or subordinate items in either sender
or receivers. If a receiver is an elementary item defined with a JUSTIFIED clause,
justification does occur. If sender is a national data item, its size is assumed to be twice the
number of national characters. Verify the receiving data structure can hold all of the national
characters.
In Example 113, several MOVE TO statements set the values of two records in working storage.
Example 113 MOVE TO Statements
WORKING-STORAGE SECTION.
01 RECORD-IN.
03 ITEM-A PIC X(5) VALUE "AAAAA".
03 ITEM-B PIC 99V99 VALUE "2.38".
03 ITEM-C PIC ZZ,ZZ9.99.
...
01 TEMPS.
03 TEMP1 PIC X(4).
03 TEMP2 PIC X(8).
03 TEMP3 PIC 9(5)V999.
03 TEMP4 PIC 9V9.
03 TEMP5.
05 T PIC 99 OCCURS 12 TIMES.
PROCEDURE DIVISION.
BEGIN-PROCESSING.
MOVE ITEM-A TO TEMP1
* TEMP1 is set to "AAAA"
MOVE ITEM-A TO TEMP2
* TEMP2 is set to "AAAAA "
MOVE ITEM-B TO TEMP3
* TEMP3 is set to 00002v380
* where "v" marks the decimal location
MOVE ITEM-B TO TEMP4
* TEMP4 is set to 2v3
* where "v" marks the decimal location
370 Procedure Division Verbs










