Libraries

A library is an object that is used to group related objects and to find objects by name. Thus a library is a directory to a group of object. The number of object contained in a library and the number of libraries on the system are limited only by the amount of storage available. Two different objects with the same can exist in the same library, only if their objects types differ. However, two objects with the same name and type can exist in different libraries.

There are three types of libraries:
1. System - 
All IBM supplied libraries e.g. QSYS, QHLPSYS, QUSRSYS
2. User - User created libraries
3. Product - 
Whenever IBM product is used it is added to the library automatically and is removed itself when    the job completes.
QSYS is the root library where the entire user defined / system defined libraries are created. QSYS is the only library that contains other library.  When you logon the first library to be load is QSYS. The system library is loaded at the first time.

All IBM supplied libraries starts with Q or #

Library Commands
1. CRTLIB
2. DSPLIB
3. CHGCURLIB
4. CHGLIB
5. CLRLIB
6. CPYLIB
7. DLTLIB