Documentation:Reference:TCL 4 - MdsWiki
Personal tools

From MdsWiki

Jump to: navigation, search



Displays information about the current status of the process, the system, or devices in the system.
Format: SHOW option


Displays the current shot number for an experiment.
Note: The SHOW CURRENT command assumes that there is only one type of tree in a directory. (If multiple tree paths point to the same directory, SHOW CURRENT can produce unexpected results.)


Displays the data in a node. The show data command will display the data in a node resolving all other node references and displaying their data recursively giving a full trace of the data structures found. It is very useful in locating unresolved references in complex expressions.


Displays a list of currently opened trees.


This command will display the current default location in the tree.


Displays the key definitions created by the DEFINE/KEY command.
Format: SHOW KEY [key-name]
Specifies the name of the key whose definition you want displayed. See the DEFINE/KEY command for a list of the valid key names.
Requests that all key definitions in the current state be displayed. You can use the /STATE qualifier to request key definitions in other states. If you use the /ALL qualifier, do not specify a key name. If no state is specified, all key definitions in the current state are displayed. Use the /STATE qualifier to specify one or more states.
Requests that only the key definition and state be displayed. The /BRIEF and /NOFULL qualifiers are equivalent.
Requests the display of the names of all states for which keys have been defined. If you have no keys defined, the SHOW KEY/DIRECTORY commandDisplays nothing. If you have not specified a state with a key definition, the SHOW KEY/DIRECTORY commandDisplays DEFAULT for the state.
Note that the /DIRECTORY qualifier is incompatible with any of the other SHOW KEY qualifiers.
Requests that all qualifiers that are associated with a definition be displayed. By default, only the state of the definition and the definition itself are displayed. The /FULL and /NOBRIEF qualifiers are equivalent.
Specifies the name of a state for which the specified key definition(s) are to be displayed. If you specify only one state name, you can omit the parentheses. State names can be any appropriate alphanumeric string. State names are created with the DEFINE/KEY command.
If you omit the /STATE qualifier or use /NOSTATE, key definitions in the current state are displayed.


Shows the default macro library name set via the SET LIBRARY command.


Shows one or more defined macros.
Format: SHOW MACRO [/FULL] [macro-name]
The name of a command macro. The string can contain from 1 to 32 characters.
If the /FULL qualifier is present the contents of the macros are shown. If omitted only the names of the macros are listed.


Show current status of server.
Format: SHOW SERVER server-name [/FULL] (wildcards permited, i.e. *::*)
If the /FULL qualifier is present more detailed information will be provided.


The show timer will show the elapsed time, cpu usage, pagefaults, direct I/O and buffer I/O since the last INIT TIMER command.


Creates a subprocess of the current process. Portions of the current process context are copied to the subprocess.
Format: SPAWN [command-string]
Specifies a command string to be executed in the context of the created subprocess. When the command completes, the subprocess terminates and control is returned to the parent process. If you use both the /INPUT qualifier and a command string, commands are obtained from the input file after the specified command string executes. The command string cannot exceed 132 characters.
Determines whether carriage return/line feed characters are prefixed to the subprocess's prompt string. By default, SPAWN copies the current setting of the parent process.
Specifies the name of an alternate command language interpreter (CLI) to be used by the subprocess. If the /CLI qualifier is not specified, the CLI used will be the same as the parent process.
The CLI you specify must be located in SYS$SYSTEM and have the file type EXE.
Specifies an input file containing one or more DCL commands to be executed by the spawned subprocess. If you specify a command string with the SPAWN command and an input file with the /INPUT qualifier, the command string is processed before the input file. Once processing of the input file is complete, the subprocess is terminated.
No wildcards are allowed in the file specification.
You cannot explicitly specify non-record-oriented process permanent files (NRO PPFs) with the /INPUT qualifier. The systemDisplays an error message when it encounters such a file as the value for /INPUT.
Note that when NRO PPFs are used as implicit input (that is, /INPUT is not specified and SYS$INPUT is a NRO PPF), the SPAWN command can succeed. The following chart shows what happens.
Process Type SYS$INPUT Implicit Input
Non-interactive NRO PPF Null Device
Any Any other SYS$INPUT
If SYS$INPUT is a terminal, it cannot have an associated terminal mailbox.
Determines whether keypad symbols and the current keypad state are copied from the parent process to the subprocess. By default, if you have established key definitions and/or states with the DEFINE/KEY and/or SET KEY commands, these settings are copied to the subprocess. Use the /NOKEYPAD qualifier if you do not want the key settings to be copied.
Determines whether the system passes process logical names and logical name tables to the subprocess. By default, all process logical names and logical name tables are copied to the subprocess except those explicitly marked CONFINE or created in executive or kernel mode.
Controls whether a message is broadcast to the terminal at which you are logged in, notifying you that your subprocess has been completed or aborted. This qualifier should not be used unless you specify the /NOWAIT qualifier. /NOTIFY also cannot be specified when the SPAWN command is executed from within a non-interactive process. The default is /NONOTIFY.
Note that messages broadcast as a result of specifying the /NOTIFY qualifer are considered to be DCL messages. Therefore, if SET BROADCAST=NODCL is in effect, all such notification messages will be suppressed.
Requests that the output from the SPAWN operation be written to the specified file.
Note that if both the /OUTPUT and /NOWAIT qualifiers are used interactively, and if SYS$COMMAND is specified as the /OUTPUT file specification, the output from both your parent process and your subprocesses will be displayed simultaneously at your terminal.
No wildcards are allowed in the file specification.
You cannot explicitly specify non-record-oriented process permanent files (NRO PPFs) with the /OUTPUT qualifier. The systemDisplays an error message when it encounters such a file as the value for /OUTPUT.
Note that when NRO PPFs are used as implicit output, the SPAWN command can succeed. The following chart shows what happens.
Process Type SYS$OUTPUT Implicit Output
Any NRO PPF Mailbox transmitting records for
parent to write to its current
Any Any other SYS$OUTPUT
If you omit the /OUTPUT qualifier, output is written to the current SYS$OUTPUT device.
Specifies the name of the subprocess to be created. If you specify a process name that already exists, an error message is displayed. By default, if you omit the /PROCESS qualifier, a unique process name is assigned with the same base name as the parent process and a unique number. The default subprocess name format is:
If the /LOG qualifier has been specified, the assigned name of the subprocess is displayed.
Specifies the prompt string for DCL to use in the subprocess. By default, SPAWN copies the current prompt from the parent process.
The string can consist of more than one character. All valid ASCII characters can be used in the string. In order to include spaces, lowercase letters or non-alphanumeric characters in your string, you must enclose the string in quotation marks. Otherwise, letters are automatically converted to uppercase, and leading and trailing spaces are removed.
If no string is specified, the DCL default prompt string "$ " is restored.
Determines whether the system passes DCL global and local symbols to the subprocess. Note that the $RESTART, $SEVERITY, and $STATUS symbols are never passed to the subprocess. The default is /SYMBOLS.
Controls whether the system waits until the current subprocess is completed before allowing more commands to be issued in the parent process. The /NOWAIT qualifier allows you to issue new commands while the specified subprocess is running. When you use the /NOWAIT qualifier interactively, be sure to use the /OUTPUT qualifier as well so that output from the subprocess is directed to a file rather than to your terminal. Otherwise, your terminal will be used by more than one process at the same time.
By default, you must wait for the subprocess to terminate before you can issue another command.
Note that specifying the /NOWAIT qualifier will cause both input and output to be shared with the parent process. If the input device is a terminal, control characters, such as CTRL/T or CTRL/Y, will also affect all subprocesses sharing the input device. CTRL/Y, for example, will interrupt all such subprocesses.
This problem may be avoided by specifying /INPUT=NL:.
MAIL> READ . . .

specify pathname

All of the commands which expect a path_name as parameter are expecting a string which identifies a node relative to the current default node in the tree. The syntax of path_names works as follows:
1) A path is a sequence of names separated by '.'s NODE.LEAF - refering to the child named LEAF of the child named NODE of the current node.
2) A path can begin with ':tagname' refering to a tag in the current tree. :TIMING.SUB1.C1 - refers to SUB1.C1 under the node whose tag is 'TIMING'
3) A path can begin with :treename::tagname refering to a tag in some other subtree. :TIME::TIMING.SUB1.C1 - as above but works from anywhere in the tree
4) A path can begin with a '-' - refering to the parent of the current node.
5) A path can begin with a '^name' - refering to some ancestor of the current node.
6) Any name in a path (except path and tree names) may contain the wild card characters '*' and '%' in the obvious way.
7) A path can contain '...' - refering to the current node and all of its descendants.


Start a server.
Format: START SERVER server-name


Stop a server.
Format: STOP SERVER server-name


MDS supports a limited use of symbol substitution. When inputting commands any string between two single quotes is assumed to be a symbol. The single quotes and the string in between is replaced by the equivalence name of the symbol is one exists. If the symbol is undefined the quotes and string are replace by a null string. Symbols can be defined via VMS DCL or the special symbols P1...P7 can be defined when invoking either a macro or indirect command file.
In this example a macro plot has been defined to take one parameter the name of the signal to be plotted. When invoked the 'P1' elements are replaced by the first parameter supplied.