VMS Help  —  LBR Routines, LBR$INSERT_KEY
    The LBR$INSERT_KEY routine inserts a new key in the current
    library index.

    Format

      LBR$INSERT_KEY  library_index ,key_name ,txtrfa [, flags]

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. 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 library
    routine. The library_index argument is the address of the
    longword that contains the index.

 key_name

    OpenVMS usage:longword_unsigned
    type:         longword (unsigned)
    access:       read only
    mechanism:    by reference
    Name of the new key you are inserting.

    If the library uses binary keys, the key_name argument is the
    address of an unsigned longword containing the value of the key.

    If the library uses ASCII keys, the key_name argument is the
    address of a string descriptor of the key with the following
    argument characteristics:

    Argument
    CharacteristicsEntry

    OpenVMS        char_string
    usage
    type           character string
    access         read only
    mechanism      by descriptor

 txtrfa

    OpenVMS usage:vector_longword_unsigned
    type:         longword (unsigned)
    access:       modify
    mechanism:    by reference
    The record file address (RFA) of the module associated with the
    new key you are inserting. The txtrfa argument is the address
    of a 2-longword array containing the RFA. You can use the RFA
    returned by the first call to LBR$PUT_RECORD.

 flags

    OpenVMS usage:mask_longword
    type:         longword (unsigned)
    access:       read only
    mechanism:    by value
    If present, specifies the key's type. The flag bits are as
    follows:

    Flag Bits               Description

    LBR$M_SYM_WEAK = 0x1    UNIX-style weak symbol attribute
    LBR$M_SYM_GROUP = 0x2   Group symbol attribute

    If this argument is not present, the normal NonGroup-Global type
    is the assumed type.

3  –  Description

    The LBR$INSERT_KEY routine inserts a new key in the current
    library index. You cannot call LBR$INSERT_KEY within the user-
    supplied routine specified in LBR$SEARCH or LBR$GET_INDEX.

4  –  Condition Values Returned

    LBR$_DUPKEY        Index already contains the specified key.
    LBR$_ILLCTL        Specified library control index not valid.
    LBR$_INVRFA        Specified RFA does not point to valid data.
    LBR$_LIBNOTOPN     Specified library not open.
    LBR$_UPDURTRAV     LBR$INSERT_KEY is called by the user-defined
                       routine specified in LBR$SEARCH or LBR$GET_
                       INDEX.
Close Help