D3Tcl command (Windows)

The D3Tcl command connects a remote VME with a TCL command from MS-DOS.


 D3Tcl {options}


-a{:[c|r]} arg Defines optional arguments to the TCL command processor. For example -a:c abc sends the string CTRL+A, CTRL+B, CTRL+C to the process.
  • If there is any space in the argument, use double quotes.
  • There is no automatic carriage return added at the end of the command.
  • There may be more than one -a flag.
  • The optional modifier c converts all alphabetic characters into a control character.
  • The optional modifier r adds a Return at the end of the string.
-c cmd Defines a command to be processed.
  • When using this flag, only one command can be processed.

    The command is executed and control is returned to MS-DOS. Note that a command that does not terminate properly may not exit to MS-DOS (remaining at TCL instead).

  • If there is any space in the command, use double quotes.
  • If the command expects any input, use the -a switch to specify them.
  • If there is more than one -c switch, the commands are executed in the specified order before returning to MS-DOS.
-d database Defines the database where the process will be logged.

The database can be in the FSI or in the VME. If not specified, the MS-DOS environment variable %D3DATABASE% is used. If the latter is not defined either, the process is logged on to FSI:DM. The user name is always the Windows user name.

-h Short help.
-i cygwin Initializes the cygwin configuration for SSH. For example, setting up terminal characteristics for proper character display.

The -i cygwin option must be used in conjunction with the -s option.

-n vme Defines the name of the VME to use.

This name is either a VME name (for example, pick0) or a computer name where the VME is running. If not specified, the MS-DOS environment variable %D3VME% is used. If the MS-DOS environment variable is not defined, the default VME name is pick0.

The -n option must be specified with the -u option.

-p pib  Defines the PIB number. Zero is valid. If not specified, the first available PIB is used.
-s Specifies an SSH connection.
-t Uses a Telnet Client to interact with the user as opposed to a console.

The type of the terminal must be j.

-u user{,password} Overrides the Windows user with the D3 user specified in user. If the D3 user has a password, it must be specified.
-w Specifies the maximum delay in seconds before an attempted connection to the VME is timed out.

In case of a time out, an error code =5 is returned.


  • Be aware that this command is not actually a TCL command and, as such, cannot be run from TCL. This command is documented in this section for the purpose of convenience.
  • When a window is opened on the Client using the D3Tcl command, the control key functions of the Update Processor will NOT be available.

When sending data to a console without the -t option, MS-DOS I/O redirection is supported.

The off or exit commands close the TCL session and return to MS-DOS.


Example 1

The following example executes the list command and sends the result.

 d3tcl -c "list file" > c:/temp/x 

Example 2

The following example executes the old editor and runs the commands de999 and fi.

 d3tcl -c "ed bp test" -a:r de999 -a:r fi 

Example 3

The following example executes the Update Processor and sends the sequence of control characters ^t (top), ^cd (cut/delete), ^cc (end cut/delete), “A", "B", and ^xf (exit/file).

 d3tcl -c "u bp test" -a:c tcdzecc -a:r "A" -a "B" a:c xf 

Example 4

The following example enters TCL and stays at TCL. The process is logged to the account MyAccount. A Telnet Client is used as the display device.

 d3tcl -d MyAccount -t 

Example 5

The following example shows TCL user joe, whose password is blow, overrides the current Windows user.

 d3tcl -u joe ,blow 

Example 6

The following example logs on to the DM account on PIB 0 and runs the commands "set-device 2, save (ft" and ":files (lnrz", passing the string Full Save as a data argument (for the save command). The output is sent to the MS-DOS file log.txt.

 d3tcl -d dm -p 0 -c "set-device 2"-c "save (ft"-c ":files (lnrz" -a:r 
 "Full Save" > log.txt

Note: It is not possible to break a process that is not at input.