tcl.copy
Copies items to output devices or between files.
Syntax
copy file.reference itemlist* {(options)} to: {(file.reference} {itemlist}
Description
copies items to an output device, to another item-id, or to another file.
If an output device is not specified in the options (either to the terminal or printer), The prompt, 'to: ' displays on the next line.
If copying to another file, a left parenthesis must precede the file name. A closing right parenthesis is not needed. If the 'file.reference' is not specified at the 'to:' prompt, the items are copied to the source file.
If no 'item.list*' is included, the items in the destination file are given the same item-ids as the items in the source file.
The 'file.reference' may refer to a dictionary level by preceding the file.reference with the word, 'dict', followed by a space. No 'itemlist*' is required when the copy follows a 'select', 'sselect', 'get-list' or 'qselect' (or any other 'list-generating' process).
File-defining items (FDI's) are 'protected' and may not be copied with the 'copy' command. See 'move-file', 'rename-file' and 'steal-file'.
Options
n (integer number) Specifies the number of items to copy. Typically used for copying data for test files.
a Activates assembly 'mlist' format.
d Deletes source (original) item after copying. Not valid with 't' or 'p' options.
f Outputs a form-feed between each item; only valid with 'p' and 't' options.
i Suppresses display of item-ids when copying between files.
l Changes item to 'list' format, if destination file is a 'dc'-type file. (R83 only)
m Activates macro (assembly) format on terminal or printer output only.
n Activates nopage function on output to the terminal; only available with 't' option.
n When used with 'o' option, this inhibits new items on copies between files. This means that the item-id must already exist in order for the item to be copied.
o Overwrites existing items when duplicate item-ids exist; has no effect if used with 't' or 'p' options.
p Directs output to system printer, via the Spooler. See also the 'cp' command.
s Suppresses display of line (attribute) numbers when used with 't' or 'p' options.
s Suppresses error message display when copying between files.
t Directs output to the terminal. See also the 'ct' command.
u If the item-id is in the destination file, the item is copied to a new item-id by creating a new item-id composed of the original item-id concatenated with a letter, starting with 'a' (lowercase 'a').
x Outputs in hexadecimal; only available with 't' and 'p' options.
Example
copy dict invoices customer.name (p
copy invoices * (od
to: (invoices,archive
copy dict invoices size
to: (dict sales
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
