VMS Help  —  LBR Routines, LBR$SET_INDEX
    The LBR$SET_INDEX routine sets the index number to use when
    processing libraries that have more than one index.

    Format

      LBR$SET_INDEX  library_index ,index_number

1  –  Returns

    OpenVMS usage:cond_value
    type:         longword (unsigned)
    access:       write only
    mechanism:    by value

    Longword condition value. Most utility routines return a
    condition value in R0. Condition values that this routine can
    return are listed under Condition Values Returned.

2  –  Arguments

 library_index

    OpenVMS usage:longword_unsigned
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Library control index returned by the LBR$INI_CONTROL routine.
    The library_index argument is the address of the longword that
    contains the index.

 index_number

    OpenVMS usage:longword_unsigned
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Index number you want to establish as the current index number.
    The index_number argument is the address of the longword that
    contains the number of the index you want to establish as the
    current index.

3  –  Description

    When you call LBR$INI_CONTROL, the Librarian sets the current
    library index to 1 (the module name table, unless the library is
    a user-developed library). If you need to process another library
    index, you must use LBR$SET_INDEX to change the current library
    index.

    Note that macro, help, and text libraries contain only one
    index; therefore, you do not need to call LBR$SET_INDEX. Object
    libraries contain two indexes. If you want to access the global
    symbol table, you must call the LBR$SET_INDEX routine to set the
    index number. User-developed libraries can contain more than one
    index; therefore, you may need to call LBR$SET_INDEX to set the
    index number.

    Upon successful completion, LBR$SET_INDEX sets the current
    library index to the requested index number. LBR routines number
    indexes starting with 1.

4  –  Condition Values Returned

    LBR$_ILLCTL        Specified library control index not valid.
    LBR$_ILLIDXNUM     Library index number specified not valid.
    LBR$_LIBNOTOPN     Specified library not open.
Close Help