$ZSO[URCE] contains a string value specifying the default file-specification for the ZEDIT and ZLINK commands. ZEDIT or ZLINK without an argument is equivalent to ZEDIT/ZLINK $ZSOURCE.
$ZSOURCE initially contains the null string. When ZEDIT and ZLINK commands have an argument, they implicitly set $ZSOURCE to a partial file-specification derived from their argument. The partial specification consists of a device name, a directory path and a file name. The file-specification may contain a file type without a version number. ZEDIT or ZLINK without an argument is equivalent to ZEDIT/ZLINK $ZSOURCE.
![]() |
|
$ZSOURCE never contains the ".M" or ".OBJ" file types. |
$ZSOURCE is a read-write Intrinsic Special Variable, (i.e., it can appear on the left side of the equal sign (=) in the argument to the SET command). A $ZSOURCE value has the form of an RMS file-specification, which may include a logical name. GT.M handles logical names that translate to other logical names by performing iterative translations according to VMS conventions. If a logical name translates to a VMS search list, GT.M uses only the first name in the list.
Example:
GTM> ZEDIT "SUBR.M" . . GTM> WRITE $ZSOURCE SUBR
Example:
GTM> ZEDIT "TEST" . . . GTM> WRITE $ZSOURCE "TEST"
Example:
GTM> ZEDIT "[USER.SMITH]REPORT.TXT" . . . GTM> WRITE $ZSOURCE [USER.SMITH]REPORT.TXT
Example:
GTM> ZLINK "BASE.OBJ"
.
.
.
GTM> WRITE $ZSOURCE
BASE