Place objects in libraries

When you create an object, it is placed in a library.

If you do not specify a library, the object is placed in the current library for the job (*CURLIB) or, if there is no current library for the job, in QGPL. When a library is created, you can specify the public authority for objects created in the library by using the CRTAUT parameter on the Create Library (CRTLIB) command. All objects placed in that library will assume the specified public authority on the CRTAUT value of the library. To specify a library, you specify a qualified name; that is, a library name and an object name. For example, the following Create Physical File (CRTPF) command creates an order entry physical file ORDHDRP to be placed in DISTLIB.

CRTPF FILE(DISTLIB/ORDHDRP)

To place an object in a library, you must have read and add authorities for the library.

More than one object of the same type cannot have the same name and be in the same library. For example, two files with the name ORDHDRP cannot both be in the library DISTLIB. If you try to place into a library an object of the same name and type as an object already in the library, the system rejects the request and sends you a message indicating the reason.

Note: Use the QSYS library for system objects only. Do not restore other licensed programs to the QSYS library because changes are lost when installing a new release of i5/OS™.
Related information
Create Library (CRTLIB) command
Create Physical File (CRTPF) command