If a GT.M routine refers to a routine that is not linked to the GT.M image, GT.M automatically attempts to ZLINK that routine. An auto-ZLINK is functionally equivalent to an explicit ZLINK of a routine without a specified directory or file extension.
The following GT.M commands and functions can initiate auto-ZLINKing:
DO
GOTO
ZBREAK
ZGOTO
ZPRINT
$TEXT()
GT.M auto-ZLINKs the routine if the following conditions are met:
ZLINK can locate and process the routine file, as indicated in the previous ZLINK Operation Summary table
The name of the routine is the same as the name of the source file; the only exception is in cases where GT.M converts a leading percent sign (%) in a file name to an underscore (_)
For DO, GOTO and ZGOTO, the reference must be through code added to the image by GT.M, that is, previously ZLINKed, XECUTEd or referenced through indirection; in other words, explicit routine references using these commands that are not resolved by the VMS LINKER can not be auto-ZLINKed; this restriction does not apply for ZBREAK, ZPRINT, and $TEXT()