$ZROutines Search Types

GT.M uses $ZRO[UTINES] to perform three types of searches:

An explicit ZLINK that specifies a non .OBJ .o extension is considered as a function that has not specified a file extension for the above searching purposes.

All searches proceed from left to right through $ZROUTINES. By default, GT.M searches directories for both source and object files. GT.M searches /NOSRC directories and object libraries only for object files. GT.M searches directories listed in a /SRC= qualifier only for source files.

Once an object-matching search locates an object file, the source search becomes limited. If the directory containing the object file has a /SRC= qualifier, GT.M only searches the directories in the attached list for matching source files. If the directory containing the object files has no qualifier, GT.M restricts the search for matching source files to the same directory. If the object module is in an object library, or a directory qualified by /NOSRC, GT.M cannot perform any operation that references the source file.

The following table shows GT.M commands and functions using $ZROUTINES and the search types they support.

GT.M Commands and $ZROUTINES Search Types

A A A

SEARCH/

FUNCTION

FILE

EXTENSION

SPECIFIED

SEARCH TYPE

OBJ-ONLY

SRC-ONLY

MATCH

EXPLICIT

ZLINK

.OBJ

X

Not .OBJ

X

None

X

AUTO-ZLINK

None

X

ZEDIT

Not .OBJ

X

ZPRINT

None

X

$TEXT

None

X

If ZPRINT or $TEXT() require a source module for a routine that is not in the current image, GT.M first performs an auto-ZLINK with a matching search.

ZPRINT or $TEXT locate the source module using a file specification for the source file located in the object module. If GT.M finds the source module in the directory where it was when it was compiled, the run-time system does not use $ZROUTINES. If GT.M cannot find the source file in the indicated location, the run-time system uses $ZROUTINES.