Library /sys$common/syshlp/helplib.hlb  —  LBR Routines, LBR$GET_RECORD
    The LBR$GET_RECORD routine returns the next data record in the
    module associated with a specified key.

    Format

      LBR$GET_RECORD  library_index [,inbufdes] [,outbufdes]

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. The library must be open and LBR$LOOKUP_KEY
    or LBR$FIND must have been called to find the key associated with
    the module whose records you want to read.

 inbufdes

    OpenVMS usage:char_string
    type:         character string
    access:       write only
    mechanism:    by descriptor
    User buffer to receive the record. The inbufdes argument is
    the address of a string descriptor that points to the buffer
    that receives the record from LBR$GET_RECORD. This argument is
    required when the Librarian subroutine record access is set to
    move mode (which is the default). This argument is not used if
    the record access mode is set to locate mode. The Description
    help topic contains more information about the locate and move
    modes.

 outbufdes

    OpenVMS usage:char_string
    type:         character string
    access:       write only
    mechanism:    by descriptor
    String descriptor that receives the actual length and address of
    the data for the record returned. The outbufdes argument is the
    address of the string descriptor for the returned record. The
    length and address fields of the string descriptor are filled in
    by the LBR$GET_RECORD routine. This parameter must be specified
    when Librarian subroutine record access is set to locate mode.
    This parameter is optional if record access mode is set to move
    mode. The Description help topic contains more information about
    the locate and move modes.

3  –  Description

    Before calling LBR$GET_RECORD, you must first call LBR$LOOKUP_
    KEY or LBR$FIND to set the internal library read context to the
    record's file address (RFA) of the module header of the module
    whose records you want to read.

    LBR$GET_RECORD uses two record access modes: locate mode and
    move mode. Move mode is the default. The LBR$SET_LOCATE and
    LBR$SET_MOVE subroutines set these modes. The record access
    modes are mutually exclusive; that is, when one is set, the other
    is turned off. If move mode is set, LBR$GET_RECORD copies the
    record to the user-specified buffer described by inbufdes. If you
    have optionally specified the output buffer string descriptor,
    outbufdes, the Librarian fills it with the actual length and
    address of the data. If locate mode is set, LBR$GET_RECORD
    returns the record by way of an internal subroutine buffer,
    pointing the outbufdes descriptor to the internal buffer. The
    second parameter, inbufdes, is not used when locate mode is set.

4  –  Condition Values Returned

    LBR$_ILLCTL        Specified library control index not valid.
    LBR$_LIBNOTOPN     Specified library not open.
    LBR$_LKPNOTDON     Requested key lookup not done.
    RMS$_EOF           Error. An attempt has been made to read past
                       the logical end of the data in the module.
Close Help