MOVE ALL
operand1
TO
operand2
[UNTIL operand3]
|
This document covers the following topics:
For an explanation of the symbols used in the syntax diagrams below, see Syntax Symbols.
Related Statements: ADD
| COMPRESS
|
COMPUTE
|
DIVIDE
|
EXAMINE
|
MOVE
|
MULTIPLY
|
RESET
|
SEPARATE
|
SUBTRACT
Belongs to Function Group: Arithmetic and Data Movement Operations
The MOVE ALL
statement is used to move repeatedly the
value of operand1 to
operand2 until operand3
is full.
Operand Definition Table:
Operand | Possible Structure | Possible Formats | Referencing Permitted | Dynamic Definition | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
operand1 | C | S | A | U | N | B | yes | no | ||||||||||||
operand2 | S | A | A | U | B | yes | yes | |||||||||||||
operand3 | C | S | N | P | I | yes | no |
Syntax Element Description:
Syntax Element | Description |
---|---|
operand1
|
Source Operand:
The source operand contains the value to be moved. All digits of a numeric operand including leading zeros are moved |
TO
operand2
|
Target Operand:
The target operand is not reset prior to the execution of the
|
UNTIL
operand3
|
UNTIL Option:
The If The |
** Example 'MOAEX1': MOVE ALL ************************************************************************ DEFINE DATA LOCAL 1 EMPLOY-VIEW VIEW OF EMPLOYEES 2 PERSONNEL-ID 2 FIRST-NAME 2 NAME 2 CITY 1 VEH-VIEW VIEW OF VEHICLES 2 PERSONNEL-ID 2 MAKE END-DEFINE * LIMIT 4 RD. READ EMPLOY-VIEW BY NAME SUSPEND IDENTICAL SUPPRESS /* FD. FIND VEH-VIEW WITH PERSONNEL-ID = PERSONNEL-ID (RD.) IF NO RECORDS FOUND MOVE ALL '*' TO FIRST-NAME (RD.) MOVE ALL '*' TO CITY (RD.) MOVE ALL '*' TO MAKE (FD.) END-NOREC /* DISPLAY NOTITLE (ES=OFF IS=ON ZP=ON AL=15) NAME (RD.) FIRST-NAME (RD.) CITY (RD.) MAKE (FD.) (IS=OFF) /* END-FIND END-READ END
NAME FIRST-NAME CITY MAKE --------------- --------------- --------------- --------------- ABELLAN *************** *************** *************** ACHIESON ROBERT DERBY FORD ADAM *************** *************** *************** ADKINSON JEFF BROOKLYN GENERAL MOTORS