tclread statement

The tclread statement loads the TCL command used to activate the program into a variable.


tclread var


var Variable in which the TCL command used to activate the program is loaded.


The program must be the program called from TCL. The tclread statement does not work when called from a subroutine or from enter or tcl statements. This statement allows parameters to be passed from TCL to a program directly without processing. Individual parameters can be extracted using the field() function.

Note: This statement is only valid when called from a main program. Calling this statement from a subroutine will return unpredictable results.


tclread is used to extract the file name and item-ID from the TCL command line. Here is a sample TCL command using the show program: