Tree Command Language A:C

MDSplus Documentation: TCL (Tree Command Language)

INDEX
Next Chapter of TCL Commands
MDSplus Document List


@

Executes a command procedure or requests the command interpreter to read subsequent command input from a specific file or device.

Format: @file-spec [p1 [p2 [... p7]]]

file-spec

Specifies either the command procedure to be executed or the device or file from which input for the preceding command is to be read.

If you do not specify a file type, the system uses the default file type depending on the utility you are using (I.E. in PCL the default file type is .PCL) .

No wildcard characters are allowed in the file specification.

p1 [p2 [... p7]]

Specifies from one to seven optional parameters to pass to the command procedure. The parameters assign character string values to the symbols named P1, P2, and so on in the order of entry, to a maximum of seven. The symbols are local to the specified command procedure. For example, if you wanted to pass in a shotnumber to a TCL script as the first parameter, your first line could look like

   EDIT mytree/SHOT=         'P1

Separate each parameter with one or more blanks. You can specify a parameter with a character string value containing alphanumeric or special characters, with the following restrictions:


ABORT

Abort the current operation being performed by a server.

Format: ABORT SERVER server-name


ADD

ADD NODE

Creates a new child of the current default node. For now with no data or attributes.

Format: ADD NODE [.|:]node_name

Precede node_name with a period if you want to create a son node. If no punctuation is specified a member node will be created. Node names must not exceed 12 characters, begin with an alphabetic character and contain any characters from the set A-Z,0-9, dollar and underscore.

NOTE: The tree must be open for write to use this command. see EDIT vs SET TREE.

qualifiers

/model=device_type

Adds a device to the tree of the specified device type. This node becomes the top node of the device.

/usage=usage_type

Specifies the usage of the node being added. This should be one of the following:

ACTION
DEVICE
DISPATCH
NUMERIC
SIGNAL
TASK
TEXT
WINDOW
AXIS
STRUCTURE (Not valid for member nodes)

All son/daughter nodes will be created with usage STRUCTURE regardless of the usage specified.

ADD TAG

Defines a tag name to point to a node.

Format: ADD TAG node_name tag_name

This command will associate the tag \TAG_NAME with the node specified by the the path node_name. Tagnames must 24 characters or less and contain characters from the set A-Z,0-9, dollar and underscore.

NOTE: The tree must be open for write to use this command. see EDIT vs SET TREE.

PARAMETERS

node_name - a node or path name specifying a node in the tree. see help specify node_name for details. Must be less than 13 characters.

tag_name - a unique string which will become an acronym for the node specified with the node_name parameter. Must be less than 25 characters.

EXAMPLES

TCL> ADD TAG \MAIN::TOP.TIMING TIMING

TCL> ADD TAG -.SUB_PART.D1 MY_D1


ATTACH

Enables you to switch control from your current process to another process in your job.

Format: ATTACH [process-name]

Parameters

process-name

Specifies the name of the process to which the connection is to be made. Process names can contain from 1 to 15 alphanumeric characters. If a connection to the specified process cannot be made, an error message is displayed. You cannot connect to the process under the following circumstances:

If you specify the /IDENTIFICATION qualifier, you cannot use the process name parameter. If you omit the /IDENTIFICATION qualifier, you must specify a process name.

Command_Qualifier

/IDENTIFICATION

/IDENTIFICATION=pid

Specifies the process identification (PID) of the process to which terminal control will be switched. When you specify a PID, you can omit the leading zeros.

If the process is not part of the current job or does not exist, an error message is displayed.

When you use the /IDENTIFICATION qualifier, do not specify the process name parameter. If you omit the /IDENTIFICATION qualifier, you must specify a process name.

Examples

1. $ ATTACH JONES_2

The ATTACH command changes the terminal's control to the process JONES_2.

2. $ ATTACH/IDENTIFICATION=30019

The ATTACH command changes the terminal's control from the current process to a process having the PID 30019. Notice that since the /IDENTIFICATION qualifier is specified, the process-name parameter is omitted.


CLEAN

Rewrites the datafile of the shot currently open. When data is inserted into an MDSplus tree, it is always appended to the end of the datafile. If a node is updated with new data, this data is added to the end of the datafile and the previous data still occupies space in this file. The clean command will create a new file and discard all "old" records. If many updates have been performed on the tree the CLEAN command can significantly reduce the size of the datafile. Note: subtrees must be cleaned individually.

Format: CLEAN experiment [/SHOT=shot-number]

EXPERIMENT

Name of experiment.

/SHOT=shot_number

Specifies the shot number of the tree to open. Default = -1 which is the model.


CLOSE

Closes experiment file. If tree was open for edit and a modification was performed, you will be asked whether you want to write out the modifications before closing the file.

Format: CLOSE [experiment] [/SHOT=number]


COMPRESS

Rewrites the datafile of the shot currently open compressing any records that can be compressed and are not expicitly set nocompress.

Format: COMPRESS experiment [/SHOT=shot-number]

EXPERIMENT

Name of experiment.

/SHOT=shot_number

Specifies the shot number of the tree to open. Default = -1 which is the model.


control_c

Typing a control_c (hitting the C key while holding down the Ctrl key) will cause any command activity to cease and return to the command prompt. Some commands may need to do some cleaning up before the exit so a slight delay might be noticed.


control_z

Typing a control_z (hitting the Z key while holding down the Ctrl key) will cause the currently executing command to abort. If a macro or indirect command file is executing, the current command will abort and execution will resume with the next command.


CREATE

Creates one of the following:

CREATE LIBRARY

Create a macro library file to store macro definitions.

Format:CREATE LIBRARY file-spec

file-spec

The file specification of the library you are creating. The CREATE LIBRARY creates a VMS text library of this file specification. If the file type is omitted the type .TLB is used.

CREATE PULSE

Create an experiment pulse file.

Format: CREATE PULSE shot_number [/include=subtree_list] -
[/exclude=subtree_list] -
[/conditional] -
[/nomain]

Note: the experiment model must be open before issuing the CREATE PULSE command using the SET TREE command.

parameters

shot-number - specifies which pulse file to create

/INCLUDE

specifies a list of subtree names that are to be included in the pulse file. Wildcards are permitted.

/EXCLUDE

specifies a list of subtree names that are to be excluded from the pulse file. Wildcards are permitted.

/CONDITIONAL

specifies that subtrees which are set NOINCLUDE (see set node /INCLUDE) will not be included in the pulse file created.

/NOMAIN

by default the main tree is always included in the pulse file. Use this qualifier if you wish to omit the main tree. This is useful if you are creating the pulse file concurrently using several processes. In this case you would include the /NOMAIN qualifier in all but one process.

examples

The following creates the pulse file for shot number 42:

SET TREE CMOD
CREATE PULSE 42

The following creates the pulse file but omits the MHD subtree.

SET TREE CMOD
CREATE PULSE 42/EXCLUDE=MHD

Note: in the above example, if the MHD tree contained subtrees, they would be created even though the MHD tree is not. To exclude the MHD tree and all its subtrees use:

SET TREE CMOD
CREATE PULSE 42/EXCLUDE=(MHD,MHD.***)