Retrieve Library Description (QLIRLIBD) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Yes

The Retrieve Library Description (QLIRLIBD) API lets you retrieve attributes for a specific library, similar to the Retrieve Library Description (RTVLIBD) command. This API also returns the number of objects in a library and the total library size, the size of the objects in the library plus the size of the library object itself. Currently, the only other function that does this is the Display Library (DSPLIB) command with OUTPUT(*PRINT). This API also returns an indication of whether or not the library is currently journaled and other journaling attributes for the library.

The QSYS2.LIBRARY_INFO table function can be used as an alternative to this API. See LIBRARY_INFO table function for more information.


Authorities and Locks

A value of *NOTAVL will be returned for the create object auditing information unless you have either all object (*ALLOBJ) or audit (*AUDIT) special authority.

Library Authority
*READ
Library Lock
*SHRRD

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable that is to receive the information requested. If this area is smaller than the actual length of the data returned, the API returns only the data that the area can hold. Refer to Format of Data Returned for details about the format.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. The minimum length is 8 bytes. If the length is larger than the size of the receiver variable, results may be unpredictable.

Library name
INPUT; CHAR(10)

The name of the library for which information is being retrieved.

Attributes to retrieve
INPUT; CHAR(*)

The information for the library that you want to retrieve.

The information must be in the following format:


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Format of Data Returned

For detailed descriptions of the fields, see Field Descriptions.



Format for Variable Length Record

For detailed descriptions of the fields, see Field Descriptions.



Field Descriptions

Bytes available. The length of all data available to return. All available data is returned if enough space is provided.

Bytes returned. The length of the data actually returned. This value includes the length of this field and all the fields following it in the structure.

If insufficient space is provided for the receiver variable, this value would be set to the last byte of the last complete variable length record.

Field value. The value of the field returned.

Key identifier. The key that identifies the returned field. For a list of the valid keys, see Keys.

Length of returned data. The length associated with a particular field.

The length includes the space required to hold the following fields:

Reserved. An unused field. This field contains hexadecimal zeros. If multiple keys are requested, a reserved value is added for boundary alignment.

Size of field. The size of the returned field.

Variable length records available. The number of complete variable length records that can be returned. All variable length records are returned if enough space is provided.

Variable length records returned. The number of variable length records actually returned.


Keys

The following table lists the valid key identifiers that can be specified in the attributes to retrieve parameter. See the Field Descriptions for the descriptions of the valid key fields.



Field Descriptions

Auxiliary storage pool (ASP) device name. The name of the ASP device where storage is allocated for the library. The following special values can be returned:

Auxiliary storage pool (ASP) group name. The name of the ASP group where storage is allocated for the library. The ASP group name is the name of the primary ASP within the ASP group. The value returned can be the same as the value returned for the auxiliary storage pool (ASP) device name field. The following special values can be returned:

Auxiliary storage pool (ASP) number. The number of the auxiliary storage pool (ASP) from which the system allocates storage for the library. The following values can be returned:

Create authority. The default public authority for an object created into the library. This is the authority given to a user who does not have specific authority to the object, who is not on an authorization list specified for the object, and whose user groups have no specific authority to the object. When you create an object into the library, the AUT parameter on the create command for the object determines the public authority for the object. If the AUT value on the create command for the object is *LIBCRTAUT, which is the default, the public authority for the object is set to the CRTAUT value for the library. The following values can be returned:

Create object auditing. The auditing value for objects created in this library. The following values can be returned:

Current or last journal library name. The name of the library that contains the journal that receives the journaled changes to the library, if the library is currently journaled. If the library was previously journaled but is not currently journaled, this field contains the name of the library that contains the last journal to which the library was journaled. This field is blank if journaling has never been started for this library.

Current or last journal name. The name of the journal that receives the journaled changes to the library, if the library is currently journaled. If the library was previously journaled but is not currently journaled, this field contains the name of the last journal to which the library was journaled. This field is blank if journaling has never been started for this library.

Currently journaled. An indication of whether or not the library is currently journaled. See the Start Journal Library (STRJRNLIB) command for more information about starting journaling for a library. The following values can be returned:

Other journaling-related fields may contain data even though the library is not currently journaled.

Journal images. The type of images that are written to the journal receiver for updates to the library. The following values can be returned:

Journal inherit rules. The rules specifying the conditions when journaling is to be inherited from the library. Journaling can be started when a new journal-eligible object created into, moved into, or restored into this library. Each rule defines the object types, object names, and operations that determine the objects for which journaling should be started and which journaling attributes those objects should have. See the Start Journal Library (STRJRNLIB) command for more information about journaling a library. The journal inherit rules are defined in a commonly shared format, Qjo_Inherit_Rules_t. See Journal Inherit Rules for more information about this layout.

Journaling last started date and time. The date and time at which journaling was last started for the library, in system time-stamp format. See Convert Date and Time Format (QWCCVTDT) API for information about using this time-stamp format. This field contains hexadecimal zeros if journaling has never been started for the library.

Library size information. Information about the size of the library, which includes the size of the objects in the library plus the size of the library object itself. Only objects to which you have an authority other than *EXCLUDE are included in the total library size. See Library Size Information Format for the format of this key.

New objects inherit journaling. Identifies whether or not new journal-eligible objects created into, moved into, or restored into this library should inherit journaling from the library according to the journal inherit rules. The journal inherit rules can be retrieved using key 21 (Journal inherit rules).

Note: You should examine the inherit rules overridden field in the journal inherit rules to determine whether or not the journal inherit rules are overridden by the existence of a data area with the name QDFTJRN in the library, regardless of the value of this field.

The following values can be returned:

Number of objects in library. The total number of external objects in the specified library. The count includes objects to which you may not be authorized.

Omit journal entry. The journal entries that will not be written. Journal entries cannot be omitted for libraries. The following values can be returned:

Starting journal receiver library auxiliary storage pool (ASP) device name. The name of the auxiliary storage pool (ASP) device where storage is allocated for the library that contains the starting journal receiver for apply. This field is blank if either the library has never been journaled or the library has not been saved and restored since journaling was started. The following special values can be returned:

Starting journal receiver library name. The name of the library that contains the starting journal receiver for apply. This field is blank if either the library has never been journaled or the library has not been saved and restored since journaling was started.

Starting journal receiver library auxiliary storage pool (ASP) group name. The name of the auxiliary storage pool (ASP) group where storage is allocated for the starting journal receiver library. The name of the ASP group is the name of the primary ASP within the group. The value returned can be the same as the value returned for the starting journal receiver library auxiliary storage pool (ASP) device name field. This field is blank if either the library has never been journaled or the library has not been saved and restored since journaling was started. The following special values can be returned:

Starting journal receiver name for apply. The name of the oldest journal receiver needed to successfully use the Apply Journaled Changes (APYJRNCHG) command. This field is blank if either the library has never been journaled or the library has not been saved and restored since journaling was started.

Text description. The user-defined text that briefly describes the library and its function.

Type of library. The library type. The following values can be returned:



Library Size Information Format

The following table shows the layout of the library size information key. For detailed descriptions of the fields, see Field Descriptions.



Field Descriptions

Information status. Whether or not all objects in the library were calculated in the library size. The following values can be returned:

Library size. The size of the library object and all of the objects in the library in units of the library size multiplier. If the information status field is 1, the total library size is equal to or smaller than the library size multiplied by the library size multiplier. If the information status field is 0, the total library size could be greater than the library size multiplied by the library size multiplier because the size of some objects has not been included in the total library size.

Library size multiplier. The value to multiply the library size by to get the total library size. The following values can be returned:

Reserved. An unused field. This field contains hexadecimal zeros.


Error Messages



API introduced: V3R1

[ Back to top | Object APIs | APIs by category ]