VMS Help  —  MACRO  /ALPHA  Directives  .LIBRARY
    Macro library directive

    Format

      .LIBRARY  quoted-literal1 [quoted-literal2]

1  –  Parameters

 quoted-literal1

    A string enclosed within double quotes that is the file
    specification of a macro library. If a logical name exists and
    it is the same as the macro library name, specify the .MLB file
    extension to override the logical name.

 quoted-literal2

    An optional string enclosed within double quotes that specifies
    a search list of file specifications where the assembler should
    look for the specified macro library. The assembler successively
    processes the search list in left-to-right order and attempts to
    locate the specified macro library in each location specified in
    the search list until the macro library is found. If the macro
    library is not found, the assembler issues a diagnostic message.
    If you omit the second argument to the .LIBRARY directive, the
    assembler uses the following search list by default:

    o  The current device and directory

    o  The device and directory specified by the logical name
       MACRO64$LIBRARY (if defined)

    o  The device and directory specified by the logical name
       ALPHA$LIBRARY (if defined)

    o  The device and directory specified by the logical name
       SYS$LIBRARY

    Logical names may be defined as OpenVMS search lists.

2  –  Description

    .LIBRARY adds a name to the macro library list that is searched
    whenever a .MCALL or an undefined opcode is encountered. The
    libraries are searched in the reverse order in which they were
    specified to the assembler.

    If you omit any information from the macro-library-name file
    description, default values are assumed. The device defaults to
    your current default disk; the directory defaults to your current
    default directory; the file type defaults to MLB.

3  –  Example

        .LIBRARY "MY_MACROS" 1
        .LIBRARY "PROJ_MACROS" "PROJ:[MACRO],PROJ:[DEVELOPMENT]" 2

      1  The first statement adds the macro library MY_MACROS.MLB
         to the macro library list. The assembler first looks for
         MY_MACROS.MLB in the current directory. If not found there,
         the assembler next looks in the directory or directories
         indicated by the MACRO64$LIBRARY logical name if it is
         defined. If not found there or if MACRO64$LIBRARY is not
         defined, the assembler next looks in the directory or
         directories indicated by the ALPHA$LIBRARY logical name
         if it is defined. If not found there or if ALPHA$LIBRARY is
         not defined, the assembler next looks in the directory or
         directories indicated by the SYS$LIBRARY logical name. If
         not found there, the assembler issues a diagnostic message.

      2  The second statement adds the macro library PROJ_MACROS.MLB
         to the macro library list. The assembler first looks for
         PROJ_MACROS.MLB in the PROJ:[MACRO] directory. If not found
         there, the assembler next looks in the PROJ:[DEVELOPMENT]
         directory. If not found there, the assembler issues a
         diagnostic message.
Close Help