/sys$common/syshlp/helplib.hlb
DEFINE, Examples

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    1.$ DEFINE/USER_MODE TM1 $DISK1:[ACCOUNTS.MEMOS]WATER.TXT

      In this example, the DEFINE command defines TM1 as equivalent
      to a file specification. After the next image runs, the logical
      name TM1 is automatically deassigned.

    2.$ DEFINE CHARLIE XXX1:[CHARLES]
      $ PRINT  CHARLIE:TEST.DAT
      Job 274 entered on queue SYS$PRINT

      In this example, the DEFINE command associates the logical name
      CHARLIE with the directory name [CHARLES] on the disk XXX1. The
      PRINT command queues a copy of the file XXX1:[CHARLES]TEST.DAT
      to the system printer.

    3.$ DEFINE PROCESS_NAME  LIBRA
      $ RUN WAKE

      In this example, the DEFINE command places the logical name
      PROCESS_NAME in the process logical name table with an
      equivalence name of LIBRA. The logical name is created in
      supervisor mode. The program WAKE translates the logical name
      PROCESS_NAME to perform some special action on the process
      named LIBRA.

    4.$ DEFINE TEMP:  XXX1:
         .
         .
         .
      $ DEASSIGN TEMP::

      In this example, the DEFINE command creates an equivalence
      name for the logical name TEMP: and places the name in the
      process logical name table. The colon is retained as part of
      the logical name. The DEASSIGN command deletes the logical
      name. Note that two colons are required on the logical name
      in the DEASSIGN command. One colon is deleted by the DEASSIGN
      command. The other colon is kept as part of the logical name.

    5.$ DEFINE PORTLAND PRTLND::YYY0:[DECNET.DEMO.COM]

      In this example, the DEFINE command places the logical name
      PORTLAND in the process logical name table with an equivalence
      name of PRTLND::YYY0:[DECNET.DEMO.COM]. Subsequent references
      to the logical name PORTLAND result in the correspondence
      between the logical name PORTLAND and the node, disk, and
      subdirectory specified.

    6.$ DEFINE LOCAL "BOSTON""JAY_SABLE JKS""::"

      In this example, the DEFINE command places the logical name
      LOCAL in the process logical name table with a remote node
      equivalence name of BOSTON"JAY_SABLE JKS"::. To satisfy
      conventions for local DCL command string processing, you
      must use three sets of quotation marks. The quotation marks
      ensure that access control information is enclosed in one set
      of quotation marks in the equivalence name.

    7.$ DEFINE MYDISK XXX0:[MYDIR], YYY0:[TESTDIR]

      In this example, the DEFINE command places the logical name
      MYDISK in the process logical name table with two equivalence
      names: XXX0:[MYDIR] and YYY0:[TESTDIR].

    8.$ DEFINE/TABLE=LNM$CLUSTER_TABLE FIRENZE FIRENZE::FIESOLE:[ETRUSCAN]

      In this example, the DEFINE command equates FIRENZE to the
      directory specification FIRENZE::FIESOLE:[ETRUSCAN] and places
      both the new logical name (FIRENZE) and its equivalence string
      (FIRENZE::FIESOLE:[ETRUSCAN]) in the default clusterwide table.
      The new logical name is automatically propagated to all nodes
      in the cluster.

    9.$  CREATE/NAME_TABLE TABLE1
      $  DEFINE/TABLE=LNM$PROCESS_DIRECTORY LNM$FILE_DEV -
      _$ TABLE1,LNM$PROCESS,LNM$JOB,LNM$GROUP,LNM$SYSTEM
      $  DEFINE/TABLE=TABLE1 -
      _$ /TRANSLATION_ATTRIBUTES=CONCEALED   WORK_DISK DKA1:

      In this example, the CREATE/NAME_TABLE command creates the
      process private logical name table TABLE1.

      The first DEFINE command ensures that TABLE1 is searched
      first in any logical name translation of a device or file
      specification (because TABLE1 is the first item in the
      equivalence string for the logical name LNM$FILE_DEV, which
      determines the default search sequence of logical name tables
      whenever a device or file specification is translated).

      The second DEFINE command assigns the logical name WORK_DISK
      to the physical device DKA1 and places the name in TABLE1.
      The logical name has the concealed attribute. Therefore, the
      logical name WORK_DISK is displayed in system messages.

    10$ CREATE/NAME_TABLE SPECIAL
      $ DEFINE/TABLE=LNM$PROCESS_DIRECTORY LNM$FILE_DEV -
      _$ SPECIAL,LNM$PROCESS,LNM$JOB,LNM$GROUP,LNM$SYSTEM
      $ DEFINE/TABLE=LNM$PROCESS_DIRECTORY TAB SPECIAL
      $ DEFINE/TABLE=TAB REPORT [CHELSEA]STORES
      $ SHOW LOGICAL/TABLE=SPECIAL REPORT
        "REPORT" = "[CHELSEA]STORES" (SPECIAL)

      In this example, the CREATE/NAME_TABLE command is used to
      create a new logical name table called SPECIAL. This table
      is defined in the process directory, LNM$PROCESS_DIRECTORY.

      The first DEFINE command ensures that SPECIAL is searched
      first in any logical name translation of a device or file
      specification (because SPECIAL is the first item in the
      equivalence string for the logical name LNM$FILE_DEV, which
      determines the default search sequence of logical name tables
      whenever a device or file specification is translated). The
      logical name LNM$FILE_DEV is placed in the process directory,
      LNM$PROCESS_DIRECTORY.

      With the next DEFINE command, a new logical name, TAB, is
      defined. TAB translates to the string SPECIAL, which identifies
      a logical name table. You must define TAB in the process
      directory because it translates iteratively to a logical name
      table.

      Next, the logical name REPORT is placed into the logical name
      table TAB. Because TAB translates to the table SPECIAL, the
      name REPORT is entered into SPECIAL table. The SHOW LOGICAL
      command verifies that the name REPORT has been entered into the
      table SPECIAL.

      Note that you can redefine TAB so it translates to a different
      table. Therefore, if you run different programs that use the
      name TAB as a table name, you can change the actual tables
      where the names are entered or referenced.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.