Copyright Digital Equipment Corp. All rights reserved.

Examples

   1.$ SAVE_DIR = F$TRNLNM("SYS$DISK")+F$DIRECTORY()
        .
        .
        .
     $ SET DEFAULT 'SAVE_DIR'

     The assignment statement concatenates the values returned
     by the F$DIRECTORY and F$TRNLNM functions, and assigns the
     resulting string to the symbol SAVE_DIR. The symbol SAVE_DIR
     consists of a full device and directory name string.

     The argument SYS$DISK is enclosed in quotation marks ("")
     because it is a character string. (The command interpreter
     treats all arguments that begin with alphabetic characters
     as symbols or lexical functions, unless the arguments are
     enclosed in quotation marks.) None of the optional arguments
     is specified, so the F$TRNLNM function uses the defaults.

     At the end of the command procedure, the original default
     directory is reset. When you reset the directory, you must
     place single quotation marks (` ')  around the symbol SAVE_DIR
     to force symbol substitution.

   2.$ DEFINE/TABLE=LNM$GROUP TERMINAL 'F$TRNLNM("SYS$OUTPUT")'

     This example shows a line from a command procedure that (1)
     uses the F$TRNLNM function to determine the name of the current
     output device and (2)  creates a group logical name table entry
     based on the equivalence string.

     You must enclose the argument SYS$OUTPUT in quotation marks
     because it is a character string.

     Also, in this example you must enclose the F$TRNLNM function
     in single quotation marks to force the lexical function to be
     evaluated; otherwise, the DEFINE command does not automatically
     evaluate the lexical function.

   3.$ RESULT= -
     _$ F$TRNLNM("INFILE","LNM$PROCESS",0,"SUPERVISOR",,"NO_ALIAS")
     $ SHOW SYMBOL RESULT
       RESULT = "FALSE"

     In this example, the F$TRNLNM function searches the process
     logical name table for the logical name INFILE. The function
     starts the search by looking for the logical name INFILE
     created in supervisor mode. If no match is found, the function
     looks for INFILE created in executive mode.

     When a match is found, the F$TRNLNM function determines whether
     the name INFILE was created with the NO_ALIAS attribute. In
     this case, the NO_ALIAS attribute is not specified.

   4.$ foo=f$trnlnm("FOO","LNM$SYSCLUSTER",,,"INTERLOCKED",)

     In this example, logical name FOO is translated in the
     LNM$SYSCLUSTER table in an interlocked manner; that is, all
     clusterwide logical name modifications in progress on this
     and other nodes are completed before the translation occurs.
     This ensures that the translation is based on the most recent
     definition of FOO.

     Because the case translation is not specified, the translation
     is by default CASE_BLIND.

   5.$ foo=f$trnlnm("FOO","LNM$SYSCLUSTER",,,"INTERLOCKED,CASE_SENSITIVE",)

     This example specifies both case sensitive and interlocked
     translation.