CP
Copies all or selected items in a file to a printer.
Command Class
TCL-II command.
Syntax
CP file-specifier item-list {(options}
Syntax Elements
file-specifier Specifies the file containing items to be copied.
item-list The list of items to be copied. This can be one or more item-ids separated by spaces, a list generated by a list-generating command, or an asterisk (*) to specify all items (but see Prompt below).
Options
A Formats assembly language source items the same way as MLIST (a command provided with the Assembler).
F Outputs a new page before each item.
L Suppresses line numbers.
X Specifies a hexadecimal dump.
Prompt
If you enter the command without specifying an item-list, the processor prompts:
ITEM ID:
Type the item-list and press RETURN.
Note
This behaviour can be changed by setting the DEFAULT.TO.ALL environment option.
Error Messages
If you enter the CP command without specifying the file-name, the following message is displayed:
[200] FILE NAME?
Control returns to TCL.
If you press only RETURN at the ITEM ID: prompt, the following message is displayed:
[203] ITEM NAME?
Control returns to TCL.
Example 1
:
CP GUESTS 121
The following report is sent to the printer:
121 001 John Smith 002 1234 W. Main Street 003 Los Angeles, CA
Example 2
:
CP INVOICESITEM ID:
13245 17701
In this example, copies of the items 13245 and 17701 are sent to the printer.
Example 3
:
CP TESTSITEM ID:
*
In this example, all items in the TESTS file are sent to the printer.
Example 4
:
CP TESTS,TEST1 *
In this example, all items in the data section TEST1 are sent to the printer.