Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
6-50
MOVE Statements
MOVE Restrictions
Move operations between the following types of data items will cause a compilation
error and should therefore not be attempted:
•
An alphabetic data item or the figurative constant SPACE to a numeric data item
•
A numeric literal, a numeric data item, or the figurative constant ZERO to an
alphabetic data item
•
A noninteger numeric literal or a noninteger numeric data item to an alphanumeric
data item
•
A numeric data item to a numeric data item that does not have at least the same
number of positions to the left of the decimal position
•
Numeric integer(s), numeric noninteger(s), and numeric edited data item to a data
item that allows only double-byte (PIC N) data.
•
A data item or literal that allows only double-byte (PIC N) data to a numeric integer,
a numeric noninteger, or a numeric edited data item.
MOVE Conventions
Data is converted and stored according to the data category of the receiving field. The
conventions are as follows:
•
Alphanumeric or alphabetic receiving data item
°
Data is stored beginning at the leftmost position in the receiving field
°
If the data in the sending item is shorter, the data is filled with spaces in the
receiving field according to the standard alignment rules described in Section 2,
SCREEN COBOL Source Program
°
If the data in the sending item is longer, the data is truncated on the right to the
length of the receiving field.
°
If the sending item is described as signed numeric, the operational sign is not
moved to the receiving field; this applies whether the sign is a part of the data
item or is a separate character.
•
Numeric receiving item
°
Data is aligned by decimal point and is filled with zeros as necessary.
°
If the receiving field is signed and the sending field is signed, the sign is moved
and converted; if the sending field is not signed, the value is signed as positive.
°
If the receiving field is not signed, the absolute value of the sending field data is
moved.
°
If the sending field is alphanumeric, the value of the sending field is treated as
an unsigned numeric integer.