Documentation:Reference:TCL 4 - MdsWiki
Navigation
Personal tools

From MdsWiki

Jump to: navigation, search

Contents

SHOW

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

SHOW CURRENT

Displays the current shot number for an experiment.
FORMAT: SHOW CURRENT experiment

SHOW DATA

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.
FORMAT: SHOW DATA nodename

SHOW DB

Displays a list of currently opened trees.
FORMAT: SHOW DB

SHOW DEFAULT

This command will display the current default location in the tree.
FORMAT: SHOW DEFAULT

SHOW KEY

Displays the key definitions created by the DEFINE/KEY command.
Format: SHOW KEY [key-name]
Parameters
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.
Command_Qualifiers
/ALL
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.
/BRIEF
/NOBRIEF
Requests that only the key definition and state be displayed. The /BRIEF and /NOFULL qualifiers are equivalent.
/DIRECTORY
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.
/FULL
/NOFULL
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.
/STATE=(state-name[,...])
/NOSTATE
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.

SHOW LIBRARY

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

SHOW MACRO

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

SHOW SERVER

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

SHOW TIMER

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

SPAWN

Creates a subprocess of the current process. Portions of the current process context are copied to the subprocess.
Format: SPAWN [command-string]
Parameters
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.
Command_Qualifiers
/CARRIAGE_CONTROL
/NOCARRIAGE_CONTROL
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.
/CLI=cli
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.
/INPUT=file-spec
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
Interactive NRO PPF SYS$COMMAND
Non-interactive NRO PPF Null Device
Any Any other SYS$INPUT
If SYS$INPUT is a terminal, it cannot have an associated terminal mailbox.
/KEYPAD
/NOKEYPAD
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.
/LOGICAL_NAMES
/NOLOGICAL_NAMES
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.
/NOTIFY
/NONOTIFY
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.
/OUTPUT=file-spec
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
SYS$OUTPUT device
Any Any other SYS$OUTPUT
If you omit the /OUTPUT qualifier, output is written to the current SYS$OUTPUT device.
/PROCESS=subprocess-name
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:
username_n
If the /LOG qualifier has been specified, the assigned name of the subprocess is displayed.
/PROMPT[=string]
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.
/SYMBOLS
/NOSYMBOLS
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.
/WAIT
/NOWAIT
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:.
Examples
SPAWN MAIL
MAIL> READ . . .
MAIL> EXIT
PCL>

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

Start a server.
Format: START SERVER server-name

STOP

Stop a server.
Format: STOP SERVER server-name

symbols

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.
Examples
1. PCL> DEFINE MACRO PLOT
DEFMAC> DRAW/AX 'P1'_TM 'P1'
DEFMAC>
PCL> SET VERIFY
PCL> PLOT TCURRENT
DRAW/AX TCURRENT_TM TCURRENT
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.