Introducing the TCL Stacker

A useful feature of TCL is the TCL Stacker. The TCL Stacker puts each command that entered on top of a stack. You can list the contents of the stack and review recent statements. You can recall, modify and re-execute any statement in the stack. You can even save a series of commands as an item in a file. This can save a lot of time when typing long INFO/ACCESS statements or performing a sequence of actions such as editing, compiling, and running a program.

TCL Stacker commands are specified with a dot (.) followed by a single-letter command. The Using the Terminal Control Language topic summarizes all of the TCL Stacker commands. The two most frequently used commands are shown below:

Stacker Command

Function

.L

List most recent statements. Can also specify the number of statements to list. Default is 20.

.X

Execute last statement. Can execute any statement from stack by supplying its number.

The following example demonstrates the .L command; the output is a list of the commands that were executed so far during this session. Note that the most recently submitted command is at the top of the stack.

> .L

001 WHO * (P

002 WHO *

003 WHO

The default length of the stack is 20. That is, up to the 20 most recently executed commands can be listed. You can execute any command from the stack using the .X command.

>.X3

WHO

2 JOHN

.X without an argument executes the statement on top of the stack.

See Also

Using User Accounts and Commands

Creating an Account

Logging On and Off

Introducing the Terminal Control Language

The Master Dictionary

Examining Your Account

User Account Command Reference