Move. DORIC 9.65, INFO-Text software
Mainos
Mainos
MOVE
MOV
E DF_item system_item system_variable string
TO
DF_item system_variable
takes the value of a data file item, system item, system variable, or character string and moves the value to a target area. The target area can be a data file item or a system variable.
arguments commandless syntax
DF_item | system_item | system_variable | string the object that contains the value to be moved into the target area.
TO indicates the location to which you are moving the specified value.
DF_item | system_variable the target area.
It is not necessary to include the command name
MOVE in the statement .
MOVE ‘ABC’ TO $CHR1 can be coded as
$CHR1 = ‘ABC’
notes
n
If you specify a string as the source value, you must enclose the string in single quotation marks. The string can be of any length that can fit on the MOVE command line, and can include any character. However, if you want to include a single quotation mark in the string, enter two consecutive single quotation marks. For example, you would enter the string 'Mum's the word.' as 'Mum''s the
word.'.
n
When a MOVE is performed from an item on a related file where there is a ‘NO-MATCH’, by default the target item is blank filled. This can be avoided by setting the system variable $MOVFLG to 1. If this is done the target item will be left intact if the source item has not been matched.
INFO Reference Manual Commands 357
MOVE discussion
Use the MOVE command to replace the value of a data file item or system variable with the value of another data file item, system item, or system variable or with a character string. MOVE does not change the value of the source item, variable, or string.
If the target area is longer than the source value, INFO puts blank spaces to the right of the value. If the target area is shorter than the source value, INFO truncates the value.
The MOVE command is a valid command in an interactive session, an odd-numbered program section, or an evennumbered program section.
In an interactive session or in an odd-numbered program section, the following considerations apply:
If the target area is a system variable, the move executes once, unless the source item is the same system variable, in which case the move executes once for each selected record.
If the target area is a data file item, the move executes once for each selected record.
example
ENTER COMMAND >SELECT D.MASTER
2 RECORD(S) SELECTED
ENTER COMMAND >LIST
$RECNO LAST-NAME
1
2
JONES
SMITH
FIRST-NAME DEPT
LARRY R & D
CATHY R & D
ENTER COMMAND >MOVE 'ENGINEERING' TO DEPT
ENTER COMMAND >LIST
$RECNO
1
2
LAST-NAME
JONES
SMITH
see also: $MOVFLG
FIRST-NAME DEPT
LARRY ENGINEERING
CATHY ENGINEERING
Moves a string to an item
358 Commands INFO Reference Manual
Lataa
Mainos