LIBRARY_INFO table function
The LIBRARY_INFO table function returns a result table that contains information about a specific library.
This information is similar to what is returned by the Retrieve Library Description (QLIRLIBD) API and the Retrieve Library Description (RTVLIBD) command
Authorization: The caller must have *READ authority to the library. The null value is returned for the OBJECT_AUDIT_CREATE column unless the caller has *ALLOBJ or *AUDIT special authority.
- library-name
- An expression that contains the name of a library.
- ignore-errors
-
A character or graphic string expression that identifies what to do when an error is encountered.
- NO
- An error is returned.
- YES
- A warning is returned.
- detailed-info
-
A character or graphic string expression that indicates which columns should be returned.
- LIBRARY_SIZE
- All the columns including the LIBRARY_SIZE column are returned. For a library with a large number of objects, LIBRARY_SIZE can be a time consuming calculation. This is the default.
- NO
- Null is returned for the LIBRARY_SIZE column.
The result of the function is a table containing one row with the format shown in the following table. All the columns are nullable.
Column Name | Data Type | Description |
---|---|---|
OBJECT_COUNT | INTEGER | The total number of external objects in the specified library. The count includes objects to which you may not be authorized. |
LIBRARY_SIZE | BIGINT | The size of the library, in bytes, which includes the size of the objects in the
library plus the size of the library object itself. This value will be a rounded value for a library
larger than 1 000 000 000 bytes. Contains the null value if detailed-info is NO. |
LIBRARY_SIZE_COMPLETE | VARCHAR(3) | Whether LIBRARY_SIZE includes all objects in the library.
Contains the null value if detailed-info is NO. |
LIBRARY_TYPE | CHAR(4) | The library type.
|
TEXT_DESCRIPTION | VARCHAR(50) | The user-defined text that briefly describes the library and its function. Contains the null value if the library has no descriptive text. |
IASP_NAME | VARCHAR(10) | The auxiliary storage pool (ASP) device name where the library is stored. If the library is
in the system ASP or one of the basic user ASPs, contains *SYSBAS. Contains the null value if the name of the ASP device cannot be determined. |
IASP_NUMBER | INTEGER | The number of the auxiliary storage pool (ASP) from which the system allocates storage for the library. |
CREATE_AUTHORITY | VARCHAR(10) | 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.
|
OBJECT_AUDIT_CREATE | VARCHAR(7) | The auditing value for objects created in this library.
Contains the null value if caller does not have either all object (*ALLOBJ) or audit (*AUDIT) special authority. |
JOURNALED | VARCHAR(3) | Identifies the current journaling status of the library.
|
JOURNAL_LIBRARY | VARCHAR(10) | 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, contains the name of the library that contains the last journal to which the
library was journaled. Contains the null value if journaling has never been started for this library. |
JOURNAL_NAME | VARCHAR(10) | 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,
contains the name of the last journal to which the library was journaled. Contains the null value if journaling has never been started for this library. |
INHERIT_JOURNALING | VARCHAR(3) | Identifies whether 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.
|
JOURNAL_INHERIT_RULES | INTEGER | The number of inherit rules defined for this library. The rules can be listed using the QSYS2.JOURNAL_INHERIT_RULES view. |
JOURNAL_START_TIMESTAMP | TIMESTAMP | The timestamp journaling was last started for this library. Contains the null value if journaling has never been started for this library. |
APPLY_STARTING_RECEIVER_LIBRARY | VARCHAR(10) | Specifies the library name of the oldest journal receiver needed to successfully use the
Apply Journaled Changes (APYJRNCHG) command. Contains the null value if the object has not been journaled or it has not been saved and restored since journaling was started. |
APPLY_STARTING_RECEIVER | VARCHAR(10) | Specifies the name of the oldest journal receiver needed to successfully use the Apply
Journaled Changes (APYJRNCHG) command. Contains the null value if the object has not been journaled or it has not been saved and restored since journaling was started. |
APPLY_STARTING_RECEIVER_ASP | VARCHAR(10) | The auxiliary storage pool (ASP) device name where APPLY_STARTING_RECEIVER is stored. If
APPLY_STARTING_RECEIVER is in the system ASP or one of the basic user ASPs, contains
*SYSBAS. Contains the null value if the name of the ASP device cannot be determined. |
Example
- Retrieve information about library
APPLIB.
SELECT * FROM TABLE(QSYS2.LIBRARY_INFO('APPLIB'));