VMS Help
LBR Routines, LBR$INI_CONTROL
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
The LBR$INI_CONTROL routine initializes a control structure,
called a library control index, to identify the library for use
by other LBR routines.
Format
LBR$INI_CONTROL library_index ,func [,type] [,namblk]
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.
library_index
OpenVMS usage:longword_unsigned
type: longword (unsigned)
access: write only
mechanism: by reference
Library control index returned by the LBR$INI_CONTROL routine.
The library_index argument is the address of a longword that is
to receive the index.
func
OpenVMS usage:longword_unsigned
type: longword (unsigned)
access: read only
mechanism: by reference
Library function to be performed. The func argument is the
address of the longword that contains the library function.
Valid functions are LBR$C_CREATE, LBR$C_READ, and LBR$C_UPDATE.
Each programming language provides an appropriate mechanism for
accessing these symbols.
type
OpenVMS usage:longword_unsigned
type: longword (unsigned)
access: read only
mechanism: by reference
Library type. The type argument is the address of the longword
containing the library type. Valid library types include the
following:
o LBR$C_TYP_OBJ (VAX object)
o LBR$C_TYP_SHSTB (VAX shareable image)
o LBR$C_TYP_EOBJ (Alpha object)
o LBR$C_TYP_ESHSTB (Alpha shareable image)
o LBR$C_TYP_MLB (macro)
o LBR$C_TYP_HLP (help)
o LBR$C_TYP_TXT (text)
o LBR$C_TYP_UNK (unknown)
o LBR$C_TYP_NCS (NCS library)
o For user-developed libraries, a type in the range of LBR$C_
TYP_USRLW through LBR$C_TYP_USRHI.
namblk
OpenVMS usage:nam
type: longword (unsigned)
access: read only
mechanism: by reference
OpenVMS RMS name block (NAM). The namblk argument is the address
of a variable-length data structure containing an RMS NAM block.
The LBR$OPEN routine fills in the information in the NAM block
so it can be used later to open the library. If the NAM block
has this file identification in it from previous use, the
LBR$OPEN routine uses the open-by-NAM block option. This argument
is optional and should be used if the library will be opened
many times during a single run of the program. For a detailed
description of RMS NAM blocks, see the OpenVMS Record Management
Services Reference Manual.
Except for the LBR$OUTPUT_HELP routine, you must call LBR$INI_
CONTROL before calling any other LBR routine. After you
initialize the library control index, you must open the library
or create a new one using the LBR$OPEN routine. You can then call
other LBR routines that you need. After you finish working with a
library, close it with the LBR$CLOSE routine.
LBR$INI_CONTROL initializes a library by filling the longword
referenced by the library_index argument with the control index
of the library. Upon completion of the call, the index can be
used to refer to the current library in all future routine calls.
Therefore, your program must not alter this value.
You can have up to 16 libraries open simultaneously in your
program.
4 - Condition Values Returned
|
LBR$_NORMAL Library control index initialized
successfully.
LBR$_ILLFUNC Requested function not valid.
LBR$_ILLTYP Specified library type not valid.
LBR$_TOOMNYLIB Error. An attempt was made to allocate more
than 16 control indexes.
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.