The $ZTRNLNM function returns information about an equivalence stored in the VMS logical name tables. The $ZTRNLNM function is analogous to the DCL Lexical function F$TRNLNM. $ZTRNLNM() optionally does iterative translation, while the DCL lexical does not. This difference only manifests itself when a logical name translates to another logical name.
The format for the $ZTRNLNM function is:
$ZTRNLNM(expr1[,expr2[,expr3[,expr4[,expr5[,expr6]]]]])
The first expression specifies the target logical name.
The second optional expression specifies the logical name table(s) for $ZTRNLNM() to use; if the argument is missing or null, $ZTRNLNM() uses the tables identified by LNM$DCL_LOGICAL, which usually uses LNM$FILE_DEV to specify searching the process, job, group and system tables in that order.
The third optional expression specifies the index (numbered from 0) that $ZTRNLNM uses if the look-up encounters a search list; if the argument is missing or null, $ZTRNLNM() uses the first element of the search list.
The fourth optional expression specifies the initial mode of the look-up; if this argument is missing or null, $ZTRNLNM() starts the look-up in USER mode (alternatives are SUPERVISOR and EXECUTIVE).
The optional fifth expression specifies a keyword indicating whether the look-up is CASE_SENSITIVE (the alternative and default is CASE_BLIND).
The optional sixth argument specifies the item keyword indicating the item of information that $ZTRNLNM() returns; if the argument is missing or null, $ZTRNLNM() returns the "VALUE" of the translated equivalence name.
$ZTRNLNM() provides a tool for examining VMS logical names environment variables from within GT.M.
If the (third) index argument is specified in conjunction with the (sixth) item argument of "FULL", the $ZTRNLNM() uses the index value throughout the iterative translation, and terminates with a null result when it encounters no equivalence name at the specified index within each iteration.
Only the first argument is required, but missing arguments before the last argument specified, must be filled with null strings ("").
$ZTRNLNM() Item Keywords |
|
ITEM KEYWORD |
$ZTRNLNM() DATA RETURNED |
ACCESS_MODE CONCEALED CONFINE FULL |
Mode: 0=USER, 1=SUPER, 2=EXEC, 3=KERNEL 1 if concealed, else 0 1 if confined, else 0 Specifies that translation iterates until the result is not a logical name, or was created with the TERMINAL attribute; FULL is not available in DCL |
LENGTH MAX_INDEX NO_ALIAS TABLE |
Length of the equivalence string Largest index defined; 1st index is a 0 1 if no alias, else 0 1 if the equivalence is the name of a logical name table, else 0 |
TABLE_NAME TERMINAL VALUE |
Name of table holding equivalence 1 if terminal, else 0 Equivalence name |