.C Command

Copies stack statements to a file item. The .C command is used in conjunction with the .R command to save frequently performed command procedures and recall them for execution. The .C command copies one or more statements from the stack to an item in a file. (The file must already exist.) Each statement then becomes an attribute in the specified file item. You can execute this procedure using the .R command.

Format

.Cn [,m,… [(options)]]

Parameter(s)

n

Number of the statement in the stack to be copied.

m

Number of one or more additional stack statements to be copied to a file item.

options

List of options that modify the operation. Enclose the options in a set of parentheses and separate the options with commas.

process

Process number of a process other than your own. This option allows you to copy statements from the stack of the specified process. You must have SYS2 privileges to use this option.

A

Copies all stack statements.

O

Overwrites existing file item.

P

Copies to printer.

T

Copies to printer.

X

Copies in hexadecimal.

After the .C command line is entered, the system displays the prompt:

TO:

Specify the destination file item with this syntax:

Format

(DICT filename) item-ID

or

(filename) item-ID

Parameter(s)

DICT

Specifies the file dictionary.

filename

Name of the file.

item-ID

Item-ID to which the selected statements will be copied.

When stack statements are copied to a file item, they are copied in the order specified.

You might find it helpful to create a standard file called TC (for Terminal Commands) to which you can routinely copy (.C) and execute (.R) stack statements.

Copying Stack Statements to a File Item

The following example copies statements 1, 3, and 6 to the file item 001 in the file TC:

>.C 1,3,6

TO: (TC) 001

1 TO 001

 

I ITEMS COPIED

Copying Stack Statements to the Master Dictionary

The following example copies statements 1, 3, and 6 to the Master Dictionary item called SAVE-STACK:

>.C 1,3,6

TO: (MD) SAVE-STACK

1 TO SAVE-STACK

 

I ITEMS COPIED

Copying Stack Statements from Another Process

Assume that process 2 is the current process. The following example copies statement 4 from process 6 to an item called SAVE-STACK in the file TC:

>.C 4 (6)

TO: (TC) SAVE-STACK

1 TO SAVE-STACK

 

I ITEMS COPIED

See Also

TCL Stacker Command Reference