$ZSO[URCE] contains a string value specifying the default pathname 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 a pathname for an argument, they implicitly set $ZSOURCE to that argument. This ZEDIT/ZLINK argument can include a full pathname or a relative one. A relative path could include a file in the current directory, or the path to the file from the current working directory. In the latter instance, do not include the slash before the first directory name. $ZSOURCE will prefix the path to the current working directory including that slash.

The file name may contain a file extension. If the extension is .m or .o, $ZSOURCE drops it. The ZEDIT command accepts arguments with extensions other than .m or .o. $ZSOURCE retains the extension when such arguments are passed.

If $ZSOURCE contains a file with an extension other than .m or .o, ZEDIT processes it but ZLINK returns an error message

$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 may include an environment variable. 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 "/usr/smith/report.txt"
.
.
.
GTM>WRITE $ZSOURCE
/usr/smith/report.txt

Example:

GTM>ZLINK "BASE.O"
.
.
.
GTM>WRITE $ZSOURCE
BASE
loading table of contents...