.X Command

The .X command executes one or more specified stack statements, after displaying them on the terminal screen. This command is useful for re-executing recently entered commands without having to retype them.

Format

.X [n [,m,...]] [(process)]

Parameter(s)

n

Number of the stack statement to be executed. The default is 1.

m

Number of each additional stack statement to be executed. Use commas (without spaces) to separate the statement numbers. The .X command displays and executes the statements in the order they are specified.

process

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

After a stack statement is re-executed, it is moved from its original position to the top of the stack.

Executing a Previously Entered Statement

This example first lists the top four statements in the stack, then executes statement 4:

>.L4

001 CREATE-FILE DATA JONES 1

002 COPY JOHNES FIRST-NAME LAST-NAME STREET

003 LIST CUSTOMERS WITH LAST-NAME "JONES"

004 LIST CUSTOMERS WITH LAST-NAME "JOHNES"

>.X4

PAGE 1   15:01:14 DD MMM YYYY

CUSTOMERS.

AJOHN760JE

HJOHN455OT

2 ITEMS LISTED.

>.L4

001 LIST CUSTOMERS WITH LAST-NAME "JOHNES"

002 CREATE-FILE DATA JONES 1

003 COPY JOHNES FIRST-NAME LAST-NAME STREET

004 LIST CUSTOMERS WITH LAST-NAME "JONES"

Statement 4 has now become statement 1. The rest of the statements in the stack have been moved down one position.

Executing Multiple Stack Statements

This example executes statements 5, 2, and 1 in the stack:

>.X3,2,1

   .

   .

   .

See Also

TCL Stacker Command Reference