Admin Alert: How to Set i5 Library Lists for 5250 and Batch Jobs
June 14, 2006 Joe Hertvik
Similar to the PATH variable in MS-DOS and Unix, every job running on the i5/OS operating system has a library list, which tells the operating system where to locate system objects that the user is requesting. Library lists and how they are generated are basic i5/OS meat and potato issues. Nothing works without them, and it is worth understanding how they are created so that you can manipulate them to your advantage.
The Elements of a Library List
Library lists on the i5/OS and OS/400 operating systems consist of the following four components that, when grouped together, define a job’s library list.
Taken together, these four components make up the default library list for any job on the system. If you are not overriding these values with custom values for the user, any job that signs on will automatically be assigned the default library list values shown above. To view your library list from a 5250 session, you can enter the Display Library List command (DSPLIBL):
If you want to edit your library list, you can enter the Edit Library List command (EDTLIBL) and add additional or delete current entries:
To display the library list being used for batch jobs, display the job using the Display Job command (DSPJOB) and enter option 13, Display library list, if active. But be aware that you can only change the library list of a batch job from commands and programs running within the batch job itself; you will not be able to externally change a batch job’s library list.
Setting Library Lists for 5250 Users
For individual 5250 user sessions, user library list entries are initially defined by a job description attached to the user profile signed on to the system. A job description is attached to every user profile via the profile’s Job Description parameter (JOBD). For i5/OS V5R2 operating systems and below, the default job description name is QDFTJOBD and it resides in the QGPL library. In i5/OS V5R3, IBM added a new default job description to the system, QDFTSVR which also resides in QGPL. You may find that QDFTSVR is used as the job description for some user profiles in those systems. To view the initial user library list entries in a job description, you can use the Display Job Description command (DSPJOBD) command, like this:
Or you can change the job description by using the Change Job Description command (CHGJOBD) like this:
Once you open a job description, you can locate and edit the user portion of the library list by going to the Initial library list parameter (INLLIBL). The initial value of INLLIBL is *SYSVAL, which tells OS/400 to assign the default library list designated in the QUSRLIBL system value, as explained above. You can also change the library list to *NONE, which, when assigned to a user profile, creates a library list where the user portion of the library list is empty; users depending on a job description where INLLIBL is set to *NONE will find a library list that only contains the system library list, any production libraries that are assigned to the list, and the current library.
You can also create your own custom user library list that contains any libraries that you need to run an application. In the INLLIBL parameter of your target job description, you can enter up to 250 different libraries if you are running OS/400 V5R1 and above or 25 libraries if you are running pre-V5R1 operating systems. After the job description is created, you can attach it to any user profiles (via the JOBD parameter) that you want to use that job description and, after signing on, the user’s library list will contain the libraries listed in the job description’s INLLIBL parameter.
There are a few things to note when adding user library entries to the INLLIBL parameter in a job description.
Assigning Library Lists to Batch Jobs
Assigning library lists to interactive 5250 jobs is relatively simple, because it is mostly based on the user profile’s job description. The process gets a little more complicated when assigning library lists to batch submitted jobs because the Submit Job command (SBMJOB) contains separate parameters for designating system library lists, current libraries, and initial user library lists for the job. Here are the parameters you need to be aware of inside SBMJOB and how these parameters affect library list creation in your batch jobs.
The nice thing about these options is that they give you some flexibility in assigning library lists to your interactive and batch jobs, when you need it. And now that you better understand how to manipulate these lists, you can create whatever custom library lists that are needed in your shop.