. (Dot - TCL Stacker Recall Command)
The TCL Stacker Recall command allows you to recall a previously executed command for re-execution or modification. Commands are stored in a stack, with the last command executed on the top.
Command class
TCL Stacker Processor.
Syntax
.{command}
Syntax elements
.The character that runs the TCL Stacker Recall command. By default a dot (.) is used, but this can be changed to any printable ASCII character with the SET-STACK command.
commandOne of the TCL Stacker commands (described below) available in the current operating environment. If omitted, the TCL Stacker Recall command enters the line editor and displays the last TCL command executed.
Comments
Once editing the command stack, you can modify any command and enter new commands. On exit, you can choose to execute the currently selected command. Use of the editor with the TCL Stacker is described in Using the Editor below.
The TCL stack is cleared whenever you log off. However, you can save it with the editor FS command and subsequently restore commands using the editor ME command.
Configuration options
-
By default, the stack size is 20 entries - you can change this with the SET-STACK command or by using the set stack size TCL Stacker command.
-
You can suppress the TCL Stacker by using the .O command or the S option to SET-STACK, or by specifying a stack size of 0.
-
You can optionally save TCL commands called from within Procs, DataBasic programs (including those in nested contexts such as triggers), and Reality SQL on the command stack. These are separately controlled as follows:
Environment Controlled by Default Proc Off DataBasic (PERFORM). .C Off Reality SQL .W On -
You can have TCL commands automatically converted to upper case (default, off). This option is controlled by the .T and .U (Reality and mvBase only) TCL stacker commands.
-
You can use the .Y stacker command or the Y option to SET-STACK to specify whether commands already on the stack are moved or copied to the top of the stack when they are reused (whether by selecting from the stack or re-entering at TCL). The default is move.
-
You can enable or inhibit a check for a trailing ESC character by using the .F TCL stacker command or the F option to SET-STACK (default, on). If enabled, TCL commands that end in a trailing ESC character are added to the command stack (without the ESC), but not executed; this allows you to save and edit complex commands that have been mistyped, without attempting to run them. Otherwise, the system attempts to execute the command and places it on the stack with its trailing ESC.
-
You can use the .Z TCL stacker command or SET-STACK to change the stacker command character to any printable ASCII character.
Commands
The commands available in the current operating environment depend on the MutliValue emulation mode selected with the DOT / TCL Stacker name
environment setting in SSM Option 4 - Define Environment Settings.
For detailed descriptions, select the emulation you require from the drop down list below:
Reality commands
.? Display help for the TCL Stacker.
.{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
..{position} Execute the stacked command at position (default, top of stack). The specified command is displayed and executed without entering the editor.
..commandListExecute the specified stacked commands. commandList is a comma-separated list of stack positions.
.ESC Toggles save without command execution when the command line ends with an ESC character. ESC is the ESC character, entered by pressing esc or CTRL+[. See also .F.
.! stringFind the first command containing string and run that command.
.A{range}/stringAppend string to the commands in range.
.B{range}/stringSplit the commands in range before string. Similar to the SP (Split) Editor command.
.C Toggle saving of commands run from within DataBasic programs.
.CL Clear the stack.
.C{O}commandList {(options}
Copy the specified commands into a TCL Macro. commandList is a comma-separated list of stack positions.
options
AAll commands are copied (commandList is ignored and can be omitted).
OOverwrite item if it exists (same as CO).
PCopy to Printer.
TCopy to Terminal.
XCopy in Hexadecimal mode. Use in combination with P or T.
Prompts for a destination in a similar way to the COPY command. You must provide a file-specifier (preceded by an open parenthesis) or an
-
With just an
item-id , the specified item is created in the MD Master Dictionary - the dictionary file that defines an account. It contains items that point to the code executed by all the TCL commands, to SYSTEM accounts, and to other accounts by means of Q-pointers. The MD also includes all File Definition Items for the account and other items. of the account. -
With just a file-specifier, an item called
Tstacker
is created in the specified file. -
With both a file-specifier and an
item-id , the specified item is created in the specified file.
.DE{range}{/string}
Delete the commands in range that contain the text string. If string is omitted, all commands in range are deleted.
.E{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.F Toggles the option to save without command execution when the command line ends with an ESC character.
.GpositionMove the command at position to the top of the stack.
.H Display help for the TCL Stacker.
.I{range}/stringInsert string at the beginning of all commands in range.
.J{range}{/string{/}}
Joins commands in range, inserting string between them. Similar to the J (Join) Editor command.
.K{range}{/string} Kill/delete the commands in range that contain string. If string is omitted, delete all commands in range.
.L{range}{/string} List the commands in range that contain string. The default, if range is omitted, is 20 commands. If string is omitted, display all commands in range.
.LOAD file-specifier item
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.M{U}{range}{U}/string/{replacement{/}{startCol{-endCol}}}{*}
Replace string with replacement in the commands in range.
If columns startCol to endCol are specified, string must exist within these columns (see Column Dependent Matching).
If U or trailing * is specified, all occurrences of string in each command are replaced.
.N Toggle the saving of the separate commands in TCL macros/sentences.
.O Switches the TCL command stacker on or off (toggle). If you switch the stacker off, the current contents of the stack are preserved; if you switch the stacker on again the previous stack size is restored.
.P Toggles the option to save commands from within Procs.
.Q Display the status of the TCL command stack. The same as running SET-STACK without any options.
.R {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.R {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.S{count} Set the size of the TCL command stack to count (0 to 500). If count is zero, the stacker is switched off; if greater than zero, it is switched on again. If you omit count, the current status of the TCL command stack is displayed.
Note
If you reduce the size of the stack, or switch off the stacker and later switch it on again with a reduced stack size, all stacked commands in positions greater than the new size are discarded.
.T Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.U Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.V{range} Force commands in range to uppercase, including quoted strings.
.W Toggles the option to save commands from within Reality SQL.
.X{position} Execute the stacked command at position (default, top of stack). The specified command is displayed and executed without entering the editor.
.XcommandListExecute the specified stacked commands. commandList is a comma-separated list of stack positions.
.X {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.X {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.Y Toggles the option to move or copy reused commands to the top of the stack (see Configuration Options).
.ZcharacterChanges the command Dot character from . to character (see also
Range Parameter
The range parameter can be any of the following:
Range | Selected Commands |
---|---|
omitted | Operate on top stack entry. |
count | Operate on the first count stack entries. |
-position | Operate on stack entries 1 to position. |
position- | Operate on stack entries position to the end. |
first-last | Operate on stack entries first to last inclusive. |
first,count | Operate on count stack entries starting with entry first. |
count,first | Operate on count stack entries starting with entry first. |
Note that stack positions number from 1.
String delimiters
When using commands that include a string parameter, a delimiter is used to separate the different syntax elements. It can be any nonnumeric character, except a space or minus sign, that does not appear in the search or replacement text. The slash (/) character is the most commonly used character for a string delimiter and is used in the command descriptions.
In the .DE (Delete), .K (Kill/delete) and .L (List) commands, using the hash (#) as a delimiter negates the search; only lines that do not contain the search text are deleted or listed.
Note that, when used as a delimiter, the colon (:) anchors the search to the starting column (see Column Dependent Matching).
String matching
The caret can be used as a wildcard character in search strings in a similar way to in the editor. Refer to the section Wildcard Character in the Editor Reference for details.
D3 commands
.? Display help for the TCL Stacker.
.{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.ESC Toggles save without command execution when the command line ends with an ESC character. ESC is the ESC character, entered by pressing esc or CTRL+[. See also .F.
.! stringFind the first command containing string and run that command.
.A{range}/stringAppend string to the commands in range.
.B{range}/stringSplit the commands in range before string. Similar to the SP (Split) Editor command.
.C Toggle saving of commands run from within DataBasic programs.
.CL Clear the stack.
Copy the specified commands into a TCL Macro. commandList is a comma-separated list of stack positions.
options
AAll commands are copied (commandList is ignored and can be omitted).
OOverwrite item if it exists (same as CO).
PCopy to Printer.
TCopy to Terminal.
XCopy in Hexadecimal mode. Use in combination with P or T.
Prompts for a destination in a similar way to the COPY command. You must provide a file-specifier (preceded by an open parenthesis) or an
- With just an
item-id , the specified item is created in the MD Master Dictionary - the dictionary file that defines an account. It contains items that point to the code executed by all the TCL commands, to SYSTEM accounts, and to other accounts by means of Q-pointers. The MD also includes all File Definition Items for the account and other items. of the account. - With just a file-specifier, an item called
Tstacker
is created in the specified file. - With both a file-specifier and an
item-id , the specified item is created in the specified file.
.DE{range}{/string}
Delete the commands in range that contain the text string. If string is omitted, all commands in range are deleted.
.E{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.F Toggles the option to save without command execution when the command line ends with an ESC character.
.GpositionMove the command at position to the top of the stack.
.H Display help for the TCL Stacker.
.I{range}/stringInsert string at the beginning of all commands in range.
.J{range}{/string{/}}
Joins commands in range, inserting string between them. Similar to the J (Join) Editor command.
.K{range}{/string} Kill/delete the commands in range that contain string. If string is omitted, delete all commands in range.
.L{range}{/string} List the commands in range that contain string. The default, if range is omitted, is 20 commands. If string is omitted, display all commands in range.
.LOAD file-specifier item
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
Replace string with replacement in the commands in range.
If columns startCol to endCol are specified, string must exist within these columns (see Column Dependent Matching).
If U or trailing * is specified, all occurrences of string in each command are replaced.
.N Toggle the saving of the separate commands in TCL macros/sentences.
.O Switches the TCL command stacker on or off (toggle). If you switch the stacker off, the current contents of the stack are preserved; if you switch the stacker on again the previous stack size is restored.
.P Toggles the option to save commands from within Procs.
.Q Display the status of the TCL command stack. The same as running SET-STACK without any options.
.R{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
Replace string with replacement in the commands in range.
If columns startCol to endCol are specified, string must exist within these columns (see Column Dependent Matching).
If U or trailing * is specified, all occurrences of string in each command are replaced.
.S{count} Set the size of the TCL command stack to count (0 to 500). If count is zero, the stacker is switched off; if greater than zero, it is switched on again. If you omit count, the current status of the TCL command stack is displayed.
.T Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.U{range} Force commands in range to uppercase, including quoted strings.
.V{range} Force commands in range to uppercase, including quoted strings.
.W Toggles the option to save commands from within Reality SQL.
.X{position} Execute the stacked command at position (default, top of stack). The specified command is displayed and executed without entering the editor.
.XcommandListExecute the specified stacked commands. commandList is a comma-separated list of stack positions.
.X {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.X {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.Y Toggles the option to move or copy reused commands to the top of the stack (see Configuration Options).
.ZcharacterChanges the command Dot character from . to character (see also
Range parameter
The range parameter can be any of the following:
Range | Selected Commands |
---|---|
omitted | Operate on top stack entry. |
count | Operate on the first count stack entries. |
-position | Operate on stack entries 1 to position. |
position- | Operate on stack entries position to the end. |
first-last | Operate on stack entries first to last inclusive. |
first,count | Operate on count stack entries starting with entry first. |
Note that stack positions number from 1.
String delimiters
When using commands that include a string parameter, a delimiter is used to separate the different syntax elements. It can be any nonnumeric character, except a space or minus sign, that does not appear in the search or replacement text. The slash (/) character is the most commonly used character for a string delimiter and is used in the command descriptions.
In the .DE (Delete), .K (Kill/delete) and .L (List) commands, using the hash (#) as a delimiter negates the search; only lines that do not contain the search text are deleted or listed.
Note that, when used as a delimiter, the colon (:) anchors the search to the starting column (see Column Dependent Matching).
String matching
The caret can be used as a wildcard character in search strings in a similar way to in the editor. Refer to the section Wildcard Character in the Editor Reference for details.
mvBase commands
.? Display help for the TCL Stacker.
.{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.ESC Toggles save without command execution when the command line ends with an ESC character. ESC is the ESC character, entered by pressing esc or CTRL+[. See also .F.
.! stringFind the first command containing string and run that command.
.A{range}/stringAppend string to the commands in range.
.B{range}/stringSplit the commands in range before string. Similar to the SP (Split) Editor command.
.C Toggle saving of commands run from within DataBasic programs.
.CL Clear the stack.
Copy the specified commands into a TCL Macro. commandList is a comma-separated list of stack positions.
options
AAll commands are copied (commandList is ignored and can be omitted).
OOverwrite item if it exists (same as CO).
PCopy to Printer.
TCopy to Terminal.
XCopy in Hexadecimal mode. Use in combination with P or T.
Prompts for a destination in a similar way to the COPY command. You must provide a file-specifier (preceded by an open parenthesis) or an
- With just an
item-id , the specified item is created in the MD Master Dictionary - the dictionary file that defines an account. It contains items that point to the code executed by all the TCL commands, to SYSTEM accounts, and to other accounts by means of Q-pointers. The MD also includes all File Definition Items for the account and other items. of the account. - With just a file-specifier, an item called
Tstacker
is created in the specified file. - With both a file-specifier and an
item-id , the specified item is created in the specified file.
.DE{range}{/string}
Delete the commands in range that contain the text string. If string is omitted, all commands in range are deleted.
.E{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.F Toggles the option to save without command execution when the command line ends with an ESC character.
.GpositionMove the command at position to the top of the stack.
.H Display help for the TCL Stacker.
.I{range}/stringInsert string at the beginning of all commands in range.
.J{range}{/string{/}}
Joins commands in range, inserting string between them. Similar to the J (Join) Editor command.
.K{range}{/string} Kill/delete the commands in range that contain string. If string is omitted, delete all commands in range.
Note
If range is a single number, it specifies a position rather than a line count (cf. Range Parameter).
.L{range}{/string} List the commands in range that contain string. The default, if range is omitted, is 20 commands. If string is omitted, display all commands in range.
.LOAD file-specifier item
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
Replace string with replacement in the commands in range.
If columns startCol to endCol are specified, string must exist within these columns (see Column Dependent Matching).
If U or trailing * is specified, all occurrences of string in each command are replaced.
.N Toggle the saving of the separate commands in TCL macros/sentences.
.O Switches the TCL command stacker on or off (toggle). If you switch the stacker off, the current contents of the stack are preserved; if you switch the stacker on again the previous stack size is restored.
.P Toggles the option to save commands from within Procs.
.Q Display the status of the TCL command stack. The same as running SET-STACK without any options.
.R {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.R {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.S{count} Set the size of the TCL command stack to count (0 to 500). If count is zero, the stacker is switched off; if greater than zero, it is switched on again. If you omit count, the current status of the TCL command stack is displayed.
Note
If you reduce the size of the stack, or switch off the stacker and later switch it on again with a reduced stack size, all stacked commands in positions greater than the new size are discarded.
.T Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.U Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.V{range} Force commands in range to uppercase, including quoted strings.
.W Toggles the option to save commands from within Reality SQL.
.X{position} Execute the stacked command at position (default, top of stack). The specified command is displayed and executed without entering the editor.
.XcommandListExecute the specified stacked commands. commandList is a comma-separated list of stack positions.
.X {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.X {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.Y Toggles the option to move or copy reused commands to the top of the stack (see Configuration Options).
.ZcharacterChanges the command Dot character from . to character (see also
Range parameter
The range parameter can be any of the following:
Range | Selected Commands |
---|---|
omitted | Operate on top stack entry. |
count | Operate on the first count stack entries. |
first-last | Operate on stack entries first to last inclusive. |
count,first | Operate on count stack entries starting with entry first. |
Note that stack positions number from 1.
String delimiters
When using commands that include a string parameter, a delimiter is used to separate the different syntax elements. It can be any nonnumeric character, except a space or minus sign, that does not appear in the search or replacement text. The slash (/) character is the most commonly used character for a string delimiter and is used in the command descriptions.
In the .DE (Delete), .K (Kill/delete) and .L (List) commands, using the hash (#) as a delimiter negates the search; only lines that do not contain the search text are deleted or listed.
Note that, when used as a delimiter, the colon (:) anchors the search to the starting column (see Column Dependent Matching).
String matching
The caret can be used as a wildcard character in search strings in a similar way to in the editor. Refer to the section Wildcard Character in the Editor Reference for details.
mvEnterprise commands
.? Display help for the TCL Stacker.
.{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.ESC Toggles save without command execution when the command line ends with an ESC character. ESC is the ESC character, entered by pressing esc or CTRL+[. See also .F.
.! stringFind the first command containing string and run that command.
.A{range}/stringAppend string to the commands in range.
.B{range}/stringSplit the commands in range before string. Similar to the SP (Split) Editor command.
.C Toggle saving of commands run from within DataBasic programs.
.CL Clear the stack.
Copy the specified commands into a TCL Macro. commandList is a comma-separated list of stack positions.
options
AAll commands are copied (commandList is ignored and can be omitted).
OOverwrite item if it exists (same as CO).
PCopy to Printer.
TCopy to Terminal.
XCopy in Hexadecimal mode. Use in combination with P or T.
Prompts for a destination in a similar way to the COPY command. You must provide a file-specifier (preceded by an open parenthesis) or an
- With just an
item-id , the specified item is created in the MD Master Dictionary - the dictionary file that defines an account. It contains items that point to the code executed by all the TCL commands, to SYSTEM accounts, and to other accounts by means of Q-pointers. The MD also includes all File Definition Items for the account and other items. of the account. - With just a file-specifier, an item called
Tstacker
is created in the specified file. - With both a file-specifier and an
item-id , the specified item is created in the specified file.
.DE{range}{/string}
Delete the commands in range that contain the text string. If string is omitted, all commands in range are deleted.
.E{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.F Toggles the option to save without command execution when the command line ends with an ESC character.
.GpositionMove the command at position to the top of the stack.
.H Display help for the TCL Stacker.
.I{range}/stringInsert string at the beginning of all commands in range.
.J{range}{/string{/}}
Joins commands in range, inserting string between them. Similar to the J (Join) Editor command.
.K{range}{/string} Kill/delete the commands in range that contain string. If string is omitted, delete all commands in range.
.L{range}{/string} List the commands in range that contain string. The default, if range is omitted, is 20 commands. If string is omitted, display all commands in range.
.LOAD file-specifier item
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
Replace string with replacement in the commands in range.
If columns startCol to endCol are specified, string must exist within these columns (see Column Dependent Matching).
If U or trailing * is specified, all occurrences of string in each command are replaced.
.N Toggle the saving of the separate commands in TCL macros/sentences.
.O Switches the TCL command stacker on or off (toggle). If you switch the stacker off, the current contents of the stack are preserved; if you switch the stacker on again the previous stack size is restored.
.P Toggles the option to save commands from within Procs.
.Q Display the status of the TCL command stack. The same as running SET-STACK without any options.
Replace string with replacement in the commands in range.
If columns startCol to endCol are specified, string must exist within these columns (see Column Dependent Matching).
If U or trailing * is specified, all occurrences of string in each command are replaced.
.Srange {(options}
Copy the commands specified by range to a file item. Accepts the same options and prompts for a destination in the same way as the .C stacker command.
.SIZE{count} Set the size of the TCL command stack to count (0 to 500). If count is zero, the stacker is switched off; if greater than zero, it is switched on again. If you omit count, the current status of the TCL command stack is displayed.
Note
If you reduce the size of the stack, or switch off the stacker and later switch it on again with a reduced stack size, all stacked commands in positions greater than the new size are discarded.
.T Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.U{range} Force commands in range to uppercase, including quoted strings.
.V{range} Force commands in range to uppercase, including quoted strings.
.W Toggles the option to save commands from within Reality SQL.
.X{position} Execute the stacked command at position (default, top of stack). The specified command is displayed and executed without entering the editor.
.XcommandListExecute the specified stacked commands. commandList is a comma-separated list of stack positions.
.X {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.X {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.Y Toggles the option to move or copy reused commands to the top of the stack (see Configuration Options).
.ZcharacterChanges the command Dot character from . to character (see also
Range parameter
The range parameter can be any of the following:
Range | Selected Commands |
---|---|
omitted | Operate on top stack entry. |
position | Operate on stack entry position. |
-position | Operate on stack entries 1 to position. |
position- | Operate on stack entries position to the end. |
line1-line2 | If line1 < line2, operate on stack entries line1 to line2 inclusive. If line1 > line2, operate on stack entries line2 to line1 inclusive. |
first,count | Operate on count stack entries starting with entry first. |
Note that stack positions number from 1.
String delimiters
When using commands that include a string parameter, a delimiter is used to separate the different syntax elements. It can be any nonnumeric character, except a space or minus sign, that does not appear in the search or replacement text. The slash (/) character is the most commonly used character for a string delimiter and is used in the command descriptions.
In the .DE (Delete), .K (Kill/delete) and .L (List) commands, using the hash (#) as a delimiter negates the search; only lines that do not contain the search text are deleted or listed.
Note that, when used as a delimiter, the colon (:) anchors the search to the starting column (see Column Dependent Matching).
String matching
The caret can be used as a wildcard character in search strings in a similar way to in the editor. Refer to the section Wildcard Character in the Editor Reference for details.
If the mvEnterprise environment is selected, the following special characters must be used for string matching:
Syntax | Result |
---|---|
string | Matching command must exactly equal string. |
string] | Matching command must start with string. |
[string | Matching command must end with string. |
[string] | Matching command must contain string. |
UniVerse commands
.? Display help for the TCL Stacker.
.{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.ESC Toggles save without command execution when the command line ends with an ESC character. ESC is the ESC character, entered by pressing esc or CTRL+[. See also .F.
.! stringFind the first command containing string and run that command.
.A{range}/stringAppend string to the commands in range.
.B{range}/stringSplit the commands in range before string. Similar to the SP (Split) Editor command.
.C Toggle saving of commands run from within DataBasic programs.
.CL Clear the stack.
Copy the specified commands into a TCL Macro. commandList is a comma-separated list of stack positions.
options
AAll commands are copied (commandList is ignored and can be omitted).
OOverwrite item if it exists (same as CO).
PCopy to Printer.
TCopy to Terminal.
XCopy in Hexadecimal mode. Use in combination with P or T.
Prompts for a destination in a similar way to the COPY command. You must provide a file-specifier (preceded by an open parenthesis) or an
- With just an
item-id , the specified item is created in the MD Master Dictionary - the dictionary file that defines an account. It contains items that point to the code executed by all the TCL commands, to SYSTEM accounts, and to other accounts by means of Q-pointers. The MD also includes all File Definition Items for the account and other items. of the account. - With just a file-specifier, an item called
Tstacker
is created in the specified file. - With both a file-specifier and an
item-id , the specified item is created in the specified file.
.DE{range}{/string}
Delete the commands in range that contain the text string. If string is omitted, all commands in range are deleted.
.E{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.F Toggles the option to save without command execution when the command line ends with an ESC character.
.GpositionMove the command at position to the top of the stack.
.H Display help for the TCL Stacker.
.I{range}/stringInsert string at the beginning of all commands in range.
.J{range}{/string{/}}
Joins commands in range, inserting string between them. Similar to the J (Join) Editor command.
.K{range}{/string} Kill/delete the commands in range that contain string. If string is omitted, delete all commands in range.
.L{range}{/string} List the commands in range that contain string. The default, if range is omitted, is 20 commands. If string is omitted, display all commands in range.
.LOAD file-specifier item
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
Replace string with replacement in the commands in range.
If columns startCol to endCol are specified, string must exist within these columns (see Column Dependent Matching).
If U or trailing * is specified, all occurrences of string in each command are replaced.
.N Toggle the saving of the separate commands in TCL macros/sentences.
.O Switches the TCL command stacker on or off (toggle). If you switch the stacker off, the current contents of the stack are preserved; if you switch the stacker on again the previous stack size is restored.
.P Toggles the option to save commands from within Procs.
.Q Display the status of the TCL command stack. The same as running SET-STACK without any options.
.R {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.R {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.S{count} Set the size of the TCL command stack to count (0 to 500). If count is zero, the stacker is switched off; if greater than zero, it is switched on again. If you omit count, the current status of the TCL command stack is displayed.
Note
If you reduce the size of the stack, or switch off the stacker and later switch it on again with a reduced stack size, all stacked commands in positions greater than the new size are discarded.
.T Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.U Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.V{range} Force commands in range to uppercase, including quoted strings.
.W Toggles the option to save commands from within Reality SQL.
.X{position} Execute the stacked command at position (default, top of stack). The specified command is displayed and executed without entering the editor.
.XcommandListExecute the specified stacked commands. commandList is a comma-separated list of stack positions.
.X {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.X {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.Y Toggles the option to move or copy reused commands to the top of the stack (see Configuration Options).
.ZcharacterChanges the command Dot character from . to character (see also
Range parameter
The range parameter can be any of the following:
Range | Selected Commands |
---|---|
omitted | Operate on top stack entry. |
count | Operate on the first count stack entries. |
-position | Operate on stack entries 1 to position. |
position- | Operate on stack entries position to the end. |
first-last | Operate on stack entries first to last inclusive. |
first,count | Operate on count stack entries starting with entry first. |
Note that stack positions number from 1.
String delimiters
When using commands that include a string parameter, a delimiter is used to separate the different syntax elements. It can be any nonnumeric character, except a space or minus sign, that does not appear in the search or replacement text. The slash (/) character is the most commonly used character for a string delimiter and is used in the command descriptions.
In the .DE (Delete), .K (Kill/delete) and .L (List) commands, using the hash (#) as a delimiter negates the search; only lines that do not contain the search text are deleted or listed.
Note that, when used as a delimiter, the colon (:) anchors the search to the starting column (see Column Dependent Matching).
String matching
The caret can be used as a wildcard character in search strings in a similar way to in the editor. Refer to the section Wildcard Character in the Editor Reference for details.
UniVision commands
.? Display help for the TCL Stacker.
.{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.ESC Toggles save without command execution when the command line ends with an ESC character. ESC is the ESC character, entered by pressing esc or CTRL+[. See also .F.
.! stringFind the first command containing string and run that command.
.A{range}/stringAppend string to the commands in range.
.B{range}/stringSplit the commands in range before string. Similar to the SP (Split) Editor command.
.C Toggle saving of commands run from within DataBasic programs.
.CL Clear the stack.
Copy the specified commands into a TCL Macro. commandList is a comma-separated list of stack positions.
options
AAll commands are copied (commandList is ignored and can be omitted).
OOverwrite item if it exists (same as CO).
PCopy to Printer.
TCopy to Terminal.
XCopy in Hexadecimal mode. Use in combination with P or T.
Prompts for a destination in a similar way to the COPY command. You must provide a file-specifier (preceded by an open parenthesis) or an
- With just an
item-id , the specified item is created in the MD Master Dictionary - the dictionary file that defines an account. It contains items that point to the code executed by all the TCL commands, to SYSTEM accounts, and to other accounts by means of Q-pointers. The MD also includes all File Definition Items for the account and other items. of the account. - With just a file-specifier, an item called
Tstacker
is created in the specified file. - With both a file-specifier and an
item-id , the specified item is created in the specified file.
.DE{range}{/string}
Delete the commands in range that contain the text string. If string is omitted, all commands in range are deleted.
.E{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.F Toggles the option to save without command execution when the command line ends with an ESC character.
.GpositionMove the command at position to the top of the stack.
.H Display help for the TCL Stacker.
.I{range}/stringInsert string at the beginning of all commands in range.
.J{range}{/string{/}}
Joins commands in range, inserting string between them. Similar to the J (Join) Editor command.
.K{range}{/string} Kill/delete the commands in range that contain string. If string is omitted, delete all commands in range.
.L{range}{/string} List the commands in range that contain string. The default, if range is omitted, is 20 commands. If string is omitted, display all commands in range.
.LOAD file-specifier item
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
Replace string with replacement in the commands in range.
If columns startCol to endCol are specified, string must exist within these columns (see Column Dependent Matching).
If U or trailing * is specified, all occurrences of string in each command are replaced.
.N Toggle the saving of the separate commands in TCL macros/sentences.
.O Switches the TCL command stacker on or off (toggle). If you switch the stacker off, the current contents of the stack are preserved; if you switch the stacker on again the previous stack size is restored.
.P Toggles the option to save commands from within Procs.
.Q Display the status of the TCL command stack. The same as running SET-STACK without any options.
.R {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.R {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.S{count} Set the size of the TCL command stack to count (0 to 500). If count is zero, the stacker is switched off; if greater than zero, it is switched on again. If you omit count, the current status of the TCL command stack is displayed.
Note
If you reduce the size of the stack, or switch off the stacker and later switch it on again with a reduced stack size, all stacked commands in positions greater than the new size are discarded.
.T Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.U Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.V{range} Force commands in range to uppercase, including quoted strings.
.W Toggles the option to save commands from within Reality SQL.
.X{position} Execute the stacked command at position (default, top of stack). The specified command is displayed and executed without entering the editor.
.XcommandListExecute the specified stacked commands. commandList is a comma-separated list of stack positions.
.X {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.X {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.Y Toggles the option to move or copy reused commands to the top of the stack (see Configuration Options).
.ZcharacterChanges the command Dot character from . to character (see also
Range parameter
The range parameter can be any of the following:
Range | Selected Commands |
---|---|
omitted | Operate on top stack entry. |
count | Operate on the first count stack entries. |
-position | Operate on stack entries 1 to position. |
position- | Operate on stack entries position to the end. |
first-last | Operate on stack entries first to last inclusive. |
first,count | Operate on count stack entries starting with entry first. |
Note that stack positions number from 1.
String delimiters
When using commands that include a string parameter, a delimiter is used to separate the different syntax elements. It can be any nonnumeric character, except a space or minus sign, that does not appear in the search or replacement text. The slash (/) character is the most commonly used character for a string delimiter and is used in the command descriptions.
In the .DE (Delete), .K (Kill/delete) and .L (List) commands, using the hash (#) as a delimiter negates the search; only lines that do not contain the search text are deleted or listed.
Note that, when used as a delimiter, the colon (:) anchors the search to the starting column (see Column Dependent Matching).
String matching
The caret can be used as a wildcard character in search strings in a similar way to in the editor. Refer to the section Wildcard Character in the Editor Reference for details.
UniData commands
.? Display help for the TCL Stacker.
.{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.ESC Toggles save without command execution when the command line ends with an ESC character. ESC is the ESC character, entered by pressing esc or CTRL+[. See also .F.
.! stringFind the first command containing string and run that command.
.A{range}/stringAppend string to the commands in range.
.B{range}/stringSplit the commands in range before string. Similar to the SP (Split) Editor command.
.C Toggle saving of commands run from within DataBasic programs.
.CL Clear the stack.
Copy the specified commands into a TCL Macro. commandList is a comma-separated list of stack positions.
options
AAll commands are copied (commandList is ignored and can be omitted).
OOverwrite item if it exists (same as CO).
PCopy to Printer.
TCopy to Terminal.
XCopy in Hexadecimal mode. Use in combination with P or T.
Prompts for a destination in a similar way to the COPY command. You must provide a file-specifier (preceded by an open parenthesis) or an
- With just an
item-id , the specified item is created in the MD Master Dictionary - the dictionary file that defines an account. It contains items that point to the code executed by all the TCL commands, to SYSTEM accounts, and to other accounts by means of Q-pointers. The MD also includes all File Definition Items for the account and other items. of the account. - With just a file-specifier, an item called
Tstacker
is created in the specified file. - With both a file-specifier and an
item-id , the specified item is created in the specified file.
.DE{range}{/string}
Delete the commands in range that contain the text string. If string is omitted, all commands in range are deleted.
.E{position} Enter the editor at the stacked command at position (default, top of stack). Stack positions number from 1.
.F Toggles the option to save without command execution when the command line ends with an ESC character.
.GpositionMove the command at position to the top of the stack.
.H Display help for the TCL Stacker.
.I{range}/stringInsert string at the beginning of all commands in range.
.J{range}{/string{/}}
Joins commands in range, inserting string between them. Similar to the J (Join) Editor command.
.K{range}{/string} Kill/delete the commands in range that contain string. If string is omitted, delete all commands in range.
.L{range}{/string} List the commands in range that contain string. The default, if range is omitted, is 20 commands. If string is omitted, display all commands in range.
.LOAD file-specifier item
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
Replace string with replacement in the commands in range.
If columns startCol to endCol are specified, string must exist within these columns (see Column Dependent Matching).
If U or trailing * is specified, all occurrences of string in each command are replaced.
.N Toggle the saving of the separate commands in TCL macros/sentences.
.O Switches the TCL command stacker on or off (toggle). If you switch the stacker off, the current contents of the stack are preserved; if you switch the stacker on again the previous stack size is restored.
.P Toggles the option to save commands from within Procs.
.Q Display the status of the TCL command stack. The same as running SET-STACK without any options.
.R {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.R {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.S{count} Set the size of the TCL command stack to count (0 to 500). If count is zero, the stacker is switched off; if greater than zero, it is switched on again. If you omit count, the current status of the TCL command stack is displayed.
Note
If you reduce the size of the stack, or switch off the stacker and later switch it on again with a reduced stack size, all stacked commands in positions greater than the new size are discarded.
.T Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.U Toggles the option to automatically convert commands to uppercase as they are saved on the stack. Quoted strings are not affected.
.V{range} Force commands in range to uppercase, including quoted strings.
.W Toggles the option to save commands from within Reality SQL.
.X{position} Execute the stacked command at position (default, top of stack). The specified command is displayed and executed without entering the editor.
.XcommandListExecute the specified stacked commands. commandList is a comma-separated list of stack positions.
.X {file-specifier} item
Add the commands from the specified item to the top of command stack and execute them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.X {file-specifier} item (L
Add the commands from the specified item to the top of command stack without executing them. If you omit file-specifier, the item is assumed to be in the MD of the account.
.Y Toggles the option to move or copy reused commands to the top of the stack (see Configuration Options).
.ZcharacterChanges the command Dot character from . to character (see also
Range parameter
The range parameter can be any of the following:
Range | Selected Commands |
---|---|
omitted | Operate on top stack entry. |
count | Operate on the first count stack entries. |
-position | Operate on stack entries 1 to position. |
position- | Operate on stack entries position to the end. |
first-last | Operate on stack entries first to last inclusive. |
first,count | Operate on count stack entries starting with entry first. |
Note that stack positions number from 1.
String delimiters
When using commands that include a string parameter, a delimiter is used to separate the different syntax elements. It can be any nonnumeric character, except a space or minus sign, that does not appear in the search or replacement text. The slash (/) character is the most commonly used character for a string delimiter and is used in the command descriptions.
In the .DE (Delete), .K (Kill/delete) and .L (List) commands, using the hash (#) as a delimiter negates the search; only lines that do not contain the search text are deleted or listed.
Note that, when used as a delimiter, the colon (:) anchors the search to the starting column (see Column Dependent Matching).
String matching
The caret can be used as a wildcard character in search strings in a similar way to in the editor. Refer to the section Wildcard Character in the Editor Reference for details.
Using the Editor
Editor commands in the TCL Stacker execute as described in the Editor Reference, with the following exceptions.
FI Saves the TCL commands currently stacked and executes the current line of the stack.
If you change the sequence of commands by using a DE (Delete), I (Insert), ME (Merge), or SP (Split Line) command and then enter the FI command, the commands in the stack are saved, but no command is executed.
To execute a command after changing the sequence of commands in the stack, either:
- Enter
F
to update the buffer and then useFI
to execute the top stack command. - Enter the line number of the command to execute and then use
FI
.
FS Saves the TCL commands currently stacked and exits to TCL.
FS (file-name item-id
Saves the TCL commands currently stacked to the specified file. The file must already exist in the current account, but the specified item must not exist. The commands in the stack remain unchanged.
Note
All other forms of the FS command are invalid.
FD Not supported for editing the TCL Stacker lines.
All other Editor commands execute in the normal way. For example:
EX Exit the TCL Stacker without saving changes or executing a command.
L99 Lists the commands in the TCL stack.
Example 1
To edit the command on line '2' and save the edit:
:.2
002 LIST CUST BY NAME NAME ADDR
.R/LIST/SORT
002 SORT CUST BY NAME NAME ADDR
.FS
:
The last entry (FS) files the edited command. Note, however, that the edited command is not executed.
Example 2
To re-execute the last command executed:
:..
001 SORT MD
Note that the .. command is equivalent to .X, ..1 and .X1.
Example 3
To re-execute the command on line '2':
:..2
002 LIST MD
Note that .X2 produces the same result.
Example 4
The example that follows assumes that you have already entered the editor, by entering the TCL Stacker command at the TCL prompt.
To list the lines in the stack, type L
at the dot prompt, followed by the number of lines to list. Having displayed line 1, you can display the remainder of the stack by entering:
.L99 002 SORT CUST BY NAME NAME ADDR 003 SORT MD WITH 2 = "35" 004 LISTFILES 005 WHO 006 CREATE-FILE STACK-TEST 3 1 EOI 006 .
To list lines 2 to 4, again assuming you have displayed line 1, enter:
.L3 002 SORT CUST BY NAME NAME ADDR 003 SORT MD WITH 2 = "35" 004 LISTFILES .
To locate the line containing the text "STACK-TEST":
.L/STACK-TEST/
006 CREATE-FILE STACK-TEST 3 1
.