Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)

Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual426750-003
6-73
MOVE Statements
Using either one of the NOT options causes the compiler to issue the same
code and the statements following the IF ... WITHIN statement are run only if
the row and column values in
data-item
are not the same as the defined row
and volume values in
screen-item
in the Screen Section.
Using both of the NOT options cancels their effect and is equivalent to using
neither one.
MOVE Statements
The MOVE statements transfer data from one data item to one or more other data
items in accordance with editing rules. The forms of the MOVE statements are:
MOVE
MOVE CORRESPONDING
MOVE Statement
The MOVE statement transfers data from a data item to one or more data items.
data-name-1
is the sending item. The item can be an identifier or a literal. Any subscripting or
indexing for
data-name-1
is evaluated only once, immediately before data is
moved to the first receiving item.
data-name-2
is the receiving item. The item is an identifier. The following example:
MOVE item-1(b) TO item-2, item-3(b)
is equivalent to:
MOVE item-1(b) TO temp
MOVE temp TO item-2
MOVE temp TO item-3(b).
The following example illustrates a number of MOVE statements:
WORKING-STORAGE SECTION.
01 record-in.
05 item-a PIC X(5).
05 item-b PIC 99V99.
77 temp1 PIC X(4).
77 temp2 PIC X(8).
77 temp3 PIC 9(5)V999.
77 temp4 PIC 9V9.
Note. For screen fields that wrap, only the first row is tested. If you test a screen field that
wraps using the IF ... WITHIN statement, a warning is issued.
MOVE
data-name-1
TO {
data-name-2
} [,] ...