MOVE
Moves items from a file/data section to:
-
Another file with the same item-ids.
-
Another data section of the same file.
The items and their time-stamps are unchanged.
Command class
TCL-II command.
Syntax
MOVE file-specifier1 {item-list | *} {(options}
TO: (file-specifier2
Syntax elements
file-specifier1The name of the file containing items to be moved; the source file.
file-specifier2The name of file to move the items to; the target file.
item-listOne or more item-ids separated by spaces.
*Specifies all the items in the source file.
If item-list and * are both omitted, MOVE automatically uses an implicit list created by a SELECT command or by a list processing command if one is available; otherwise, you are prompted for an item list (this behaviour can be changed by setting the DEFAULT.TO.ALL environment option).
Options
ILists destination item-ids as they are moved.
OOverwrites destination file items with source file items if item-ids are the same.
All source items must exist when you move multiple items. If an item you are moving is not on file, the message 'item-id' NOT ON FILE is displayed and no operation is executed on that item-id.
Moving items between files
Multiple item-ids can be moved in one operation. The item-ids of items to be moved are typed at the prompt in sequence, separated by spaces.
At the TO: prompt type an open parenthesis, the destination file-name and press return.
If the parenthesis is missing or if item-ids are appended then the message [1434] The file reference ' file-specifier2 ' is invalid for this operation.
is displayed and the MOVE command aborted.
All source items must exist when you move multiple items. If an item you are moving is not on file, the message 'item-id' NOT ON FILE is displayed and no operation is executed.
The destination file must exist. If you need to move items to a new file, you must first create the file by using the CREATE-FILE command.
You must have update access to both the source and target files in order to move items between them. Otherwise the operation will be aborted.
Moving file dictionary items
You can use the MOVE command to move any item that resides within the dictionary of a file except data level descriptors (D-pointers). If D-pointers are to be moved use the MOVE-FILE command. Any attempt to move a D-pointer produces the following error message:
[455] File-definition item 'item-name' was not moved. The MOVE-FILE verb must be used for this operation.
If you want the destination to be the dictionary of a file, include the word DICT after the open parenthesis and before the file-name.
To move the items in both the dictionary and data section(s) to a new file, you must execute the MOVE command once for the file dictionary and once for each data section you want to move.
Moving to or from another account
You can move items from one account to another by specifying an implicit Q-pointer as either the source or destination filename.
Examples
To move all 32 items from FILE.A to FILE.B:
:MOVE FILE.A * TO:(FILE.B 32 Items moved.
To move an item ITEM.A to a new file already containing an ITEM.A then the override option must be used.
:MOVE OLD.FILE ITEM.A (O TO(NEW.FILE 1 Items moved.