Please explain about libraries in the AS400 system and why they are used. What are the naming conventions that we need to follow while creating a library in the QSYS library? What are the different types of libraries available in the AS400 system? How can we create the library and what are the commands associated with the library on the AS400 system,
The library in the AS400 system is a collection of different types of objects.
QSYS
is the system library and is the only available library in as400 that contains other libraries on the as400 system. Any other library other thanQSYS
cannot contain a library-type object.*LIB
.CRTLIB
.CREATE SCHEMA
SQL statement that creates a library-type object and it differs from the library created using theCRTLIB
command. The schema contains a journal and journal receiver by default which is not available in the library. that’s the difference between schema and library.QSYS
library gets loaded first as it is a root library./qsys.lib/libname.lib
EDTLIBL
command or add the library to the library list using the ADDLIBLE command.Q
or#
. The system library is always present at the top of the library list. A maximum of 15 system libraries can be present on the library list at a time. To display the system libraries in the library list you can run the commandDSPSYSVAL SYSVAL(QSYSLIBL)
to view the system valueQSYSLIBL
that contains the default system libraries.CHGCURLIB
.CRTLIB
command orCREATE SCHEMA
SQL statement. The user portion of the job can be stored in the job description i.e.JOBD
type objects. You can display user libraries in the library list using the system valueQUSRLIBL
. Run commandDSPSYSVAL SYSVAL(QUSRLIBL)
.*PROD
means production library then files in the production library cannot be opened for update in debug mode. A user can specify *NO for theUPDPROD
parameter (update production files) on theSTRDBG
command (Start debug) to start with testing. However, this option will not stop the program from being debugged to delete records or update other objects like data areas in the library.*TEST
means test library. Files can be updated during testing.QGPL
is the general-purpose library in AS400.