F$TRNLNM()
F$TRNLNM() is a lexical function used to translate logical names to equivalent strings.
Format
F$TRNLNM (logical-name [,table] [,index] [,mode] [,case] [,item])
Any elements except logical name can be omitted; the defaults are used. If the elements specified are not consecutive (e.g. table and index are omitted but mode is specified), the commas still need to be supplied.
Table
A table name. For example, “LNM$SYSTEM_TABLE”.
- SYSTEM: LNM$SYSTEM_TABLE
- PROCESS: LNM$PROCESS_TABLE
$ write sys$output f$trnlnm("WELCOME","LNM$SYSTEM_TABLE”) SYS$COMMON:[SYSMGR]WELCOME.TXT;1
Index
The index of the equivalence name to be returned if the logical has more than one translation. Begins with zero. For example, if you have two translations, specify 0 to get the first one and 1 to get the second one.
$ show log mylog "MYLOG" = "DKA0:[DATA1]LOG1.LOG" (LNM$SYSTEM_TABLE) = "DKA0:[DATA2]LOG2.LOG" $ write sys$output f$trnlnm("MYLOG","LNM$SYSTEM_TABLE",0) DKA0:[DATA1]LOG1.LOG $ write sys$output f$trnlnm("MYLOG","LNM$SYSTEM_TABLE",1) DKA0:[DATA2]LOG2.LOG
Mode
The mode that the logical is defined in: USER (default), SUPERVISOR, EXECUTIVE, or KERNEL.
$ write sys$output f$trnlnm("WELCOME","LNM$SYSTEM_TABLE",,"SUPERVISOR") SYS$COMMON:[SYSMGR]WELCOME.TXT;1
Case
CASE_BLIND (default), CASE_SENSITIVE, NONINTERLOCKED (default), and INTERLOCKED.
- CASE_BLIND: the F$TRNLNM searches the logical name table for the first occurrence of the logical name, regardless of the case, and returns the translation. If no match is found for either case, the function returns a null string ("").
- CASE_SENSITIVE: the F$TRNLNM function searches only for a logical name with characters of the same case as the logical-name argument. If no exact match is found, the F$TRNLNM function returns a null string ("").
- INTERLOCKED: the F$TRNLNM function does not take effect until all clusterwide logical name modifications in progress complete. Then, if a match is found, the result of the translation is returned. If no match is found, the F$TRNLNM function returns a null string ("").
- NOINTERLOCKED: the F$TRNLNM function takes effect immediately. If a match is found, the result of the translation is returned. If no match is found, the F$TRNLNM function returns a null string ("").
Item
The information you obtain from the logical name (default is value).
Item | Description |
---|---|
ACCESS_MODE | TRUE or FALSE to indicate whether the logical name is confined. If the logical name is confined (TRUE), then the name is not copied to subprocesses. If the logical name is not confined (FALSE), then the name is copied to subprocesses. |
CLUSTERWIDE | TRUE or FALSE to indicate whether the logical name is in a clusterwide name table. |
CONCEALED | TRUE or FALSE to indicate whether the CONCEALED attribute was specified with the /TRANSLATION_ATTRIBUTES qualifier when the logical name was created. The CONCEALED attribute is used to create a concealed logical name. |
CONFINED | TRUE or FALSE to indicate whether the logical name is confined. If the logical name is confined (TRUE), then the name is not copied to subprocesses. If the logical name is not confined (FALSE), then the name is copied to subprocesses. |
CRELOG | TRUE or FALSE to indicate whether the logical name was created with the $CRELOG system service or with the $CRELNM system service, using the CRELOG attribute. If the logical name was created with the $CRELOG system service or with the $CRELNM system service, using the CRELOG attribute, then TRUE is returned. Otherwise, FALSE is returned. |
LENGTH | Length of the equivalence name associated with the specified logical name. If the logical name has more than one equivalence name, the F$TRNLNM function returns the length of the name specified by the index argument. |
MAX_INDEX | The largest index defined for the logical name. The index shows how many equivalence names are associated with a logical name. The index is zero based; that is, the index zero refers to the first name in a list of equivalence names. |
NO_ALIAS | TRUE or FALSE to indicate whether the logical name has the NO_ALIAS attribute. The NO_ALIAS attribute means that a logical name must be unique within outer access mode. |
TABLE | TRUE or FALSE to indicate whether the logical name is the name of a logical name table. |
TABLE_NAME | Name of the table where the logical name was found. |
TERMINAL | TRUE or FALSE to indicate whether the TERMINAL attribute was specified with the /TRANSLATION_ATTRIBUTES qualifier when the logical name was created. The TERMINAL attribute indicates that the logical name is not a candidate for iterative translation. |
VALUE | Default. The equivalence name associated with the specified logical name. If the logical name has more than one equivalence name, the F$TRNLNM function returns the name specified by the index argument. |
$ write sys$output f$trnlnm("WELCOME","LNM$SYSTEM_TABLE",,,,"ACCESS_MODE") EXECUTIVE $ write sys$output f$trnlnm("sys$common", "LNM$SYSTEM_TABLE",,,,"CONCEALED") TRUE $ show log sys$common "SYS$COMMON" = "SMAN01$DKA0:[SYS0.SYSCOMMON.]" (LNM$SYSTEM_TABLE) $ write sys$output f$trnlnm("sys$common", "LNM$SYSTEM_TABLE",,,,"LENGTH") 29