A library in AS/400 (IBM i) is a system-level object that organizes and stores other objects such as programs, files, and data. It functions similarly to a directory or folder in other operating systems but has enhanced security, object-based management, and integrated access control.
Library Type | Purpose |
---|---|
QSYS | System library containing IBM-supplied objects. |
QGPL | General purpose library for shared use. |
QTEMP | Temporary library that exists only for the job duration. |
User Libraries | Custom libraries created by users to store programs and data. |
Product Libraries | Contain third-party or IBM software components. |
Command | Function |
---|---|
CRTLIB | Create a new library. |
WRKLIB | Work with libraries (view/manage). |
DSPLIB | Display library contents. |
DLTLIB | Delete a library. |
CHGLIB | Change library attributes. |
Example :
To create a library called MYLIB
, use :
CRTLIB LIB(MYLIB)
To add MYLIB
to the current session’s library list :
ADDLIBL LIB(MYLIB)
* Efficient Organization – Stores objects logically for easy access.
* Security & Access Control – Provides granular control over who can access or modify objects.
* Performance Optimization – System searches objects based on the Library List (LIBL), improving efficiency.
* Backward Compatibility – Applications remain functional across system upgrades.