fhg
Volume 6, Number 23 -- June 14, 2006

Admin Alert: How to Set i5 Library Lists for 5250 and Batch Jobs

Published: June 14, 2006

by 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.

  1. The job's System Library list, which lists all the libraries that contain base system objects that i5/OS needs to run a job. By default, system library list entries are designated in the System part of the library list system value (QSYSLIBL). When i5/OS is building a user's library list, it always puts the system libraries at the top of the list, and system libraries are the first libraries that the operating system searches when looking for a job object. Although you can insert additional library names into QSYSLIBL, you should only list IBM-supplied libraries in QSYSLIBL to avoid any problems with accidentally invoking earlier or incorrect versions of operating system programs. The system library list will usually contain the QSYS and QSYS2 libraries for system programs and objects; the QHLPSYS library, which contains help text information for the operating system; and the QUSRSYS library, which is IBM's system library for user objects.
  2. The job's Product Library list entries designate additional IBM libraries that the system uses to support languages and program objects that are not contained in the QSYS library. Users cannot add Product Library list entries to a library list; only the operating system can insert up to two Product Library list entries into the library list when it needs to reference various system program libraries. For example, when you use the Start PDM command (STRPDM), the operating system will insert the QPDA library into your library list as a Product Library list entry. When i5/OS is looking for an object, the Product Libraries list (if any entries are included) is always searched second after the System Library list.
  3. The job's Current Library is the first user library in the library list. The default current library value is defined in the Current Library parameter (CURLIB) of the signed on user's profile description. The current library value is also used as the default library for accessed objects that designate *CURLIB as their library value. If no current library is specified for a user, the system will use the QGPL library as its default. The system searches the Current Library third if it doesn't find the target object in either the System Library list or in the Product Library list.
  4. The User Library list contains all of your application, data, test, and personal libraries that you want users to access on your system. By default, it is maintained by an i5 administrator in the User part of the library list system value (QUSRLIBL). The User library list is the last set of libraries searched on library list calls. As of OS/400 V5R1, IBM increased the size of the User Library List so that you can designate up to 250 library names in the list. On pre-V5R1 systems, the User Library list could only contain a maximum of 25 libraries.

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):

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:

EDTLIBL

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:

DSPJOBD JOBD(Library_name/Job_description_name)

Or you can change the job description by using the Change Job Description command (CHGJOBD) like this:

CHGJOBD JOBD(Library_name/Job_description_name)

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.

  • i5/OS does not prevent you from adding an invalid library name to the INLIBL parameter. It will give you a warning if you add an unknown library to the list, but it will still add the library to the INLLIBL parameter list of the job description. If you assign a job description with an invalid user library name to a user profile, that user will not be able to sign on until you correct or delete the invalid library name in the user's job description.
  • i5/OS will prevent you from adding the same library twice to your job description's INLLIBL parameter. If you attempt to enter the same library twice in an INLLIBL parameter, the CHGJOBD command will not update the job description and you will lose that change and any other job description changes that you have entered.

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 System Library list parameter (SYSLIBL) tells i5/OS which system library list to assign to the submitted job. It has two values: *CURRENT (the default) and *SYSVAL. When set to *CURRENT, the submitted job uses the system portion of the library list from the job or thread that submitted the job. So if I am signed on as user JOE and I submit a job where SYSLIBL is set to *CURRENT, the system will give the submitted job the same System Library list that is already assigned to my signed-on job. If I change the SBMJOB SYSLIBL value to *SYSVAL, it assign the system libraries designated in the System part of the library list system value (QSYSLIBL) to the system library list of my submitted job.
  • The Current library list parameter (CURLIB) of SBMJOB tells i5/OS what library should be assigned as the current library for the submitted job. If I set this parameter to *CURRENT (the default), it assigns the current library of the submitting job or thread to the newly submitted job. If I set it to *USRPRF, it will set the current library portion of the submitted job's library list to the current library associated with the user the job is running under (as defined in the USER parameter of the SBMJOB command). If I set CURLIB to *CRTDFT, the system does not assign a current library to the job; rather it uses QGPL as the default current library if the job specifies that it needs to create objects in the current library. The last option for CURLIB is that I can just set it to any one particular library for the submitted job by entering that library's name in this field.
  • The Initial library list parameter (INLLIBL) of SBMJOB tells i5/OS what library entries should be assigned to the user library list portion of the submitted job. As with the other two library parameters, if you set it to *CURRENT, it assigns the user library list of the submitting job or thread to the submitted job. Setting INLLIBL to *JOBD sets the job's user library list to whatever library list is designated in the job description specified in the Job description parameter (JOBD) of the SBMJOB command. By default, this will be set to the library list in the job description of the user profile under which the job is running. The INLLIBL parameter can also be set to *SYSVAL which sets the user portion of the library list to the library list designated in the User part of the library list system value (QUSRLIBL). And you can also set INLLIBL to *NONE, which will set the user library portion of the library list to an empty list. Finally, you can enter your own custom library list into the INLLIBL parameter by specifying a list of library names that you want to be included in the job's user library list. As with the library list entries in a job description, all of these libraries must be valid i5/OS library names and you cannot duplicate any one library in the list.

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.



Sponsored By
COMMON

COMMON Fall 2006
IT Education Conference & Expo
Miami Beach, Florida
September 17-21, 2006

Register Now!

COMMON is the world's largest community of IBM midrange users providing information, education and networking for end-users. COMMON is hosting its Fall 2006 IT Education Conference & Expo in Miami Beach, Florida, September 17-21, and will feature a host of sessions and hands-on labs covering business strategy, database, systems management, networking and development, with a featured educational focus on Disaster Recovery. Take advantage of the real-world technical education, best-practice sharing with fellow iSeries users, and access to IBM executives and developers that you can't find anywhere else!

Conference Highlights
· Choose from hundreds of sessions organized by specific Courses of Study to help
      you find the technical information you need.
· Explore the latest technology solutions in the industry's largest iSeries-related Expo.
· Network with like-minded peers at COMMON social events.
· Speak directly with IBM executives at the iSeries Town Hall Meeting and take
      advantage of multiple opportunities to talk with the IBM experts who build the
      technology that you use every day.

COMMON education is one of the most cost-effective ways to gain the tools and knowledge you need to meet the changing demands of information technology. You'll receive education unlike any offered within the industry that will enable you to garner a tangible and immediate return on your investment. In fact, more than 95% of COMMON Spring 2005 attendees said they gained information from sessions that was of immediate value when they returned to work.

In addition to the direct savings on education, conference attendees make lasting career connections with other iSeries professionals whom they can consult long after the conference ends. Attendees will also have direct access to IBM developers and managers. The Expo offers an opportunity to talk one-on-one with industry vendors who provide the latest products and services. This means attendees return to the office with real-time solutions that can be implemented immediately--without wasting countless hours in independent research.

For more information on COMMON and to register, please visit:
www.common.org



Senior Technical Editor: Ted Holt
Technical Editors: Howard Arner, Joe Hertvik, Shannon O'Donnell, Kevin Vandever
Contributing Technical Editors: Joel Cochran, Wayne O. Evans, Raymond Everhart,
Bruce Guetzkow, Brian Kelly, Marc Logemann, David Morris
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

COMMON:  Join us at the Fall 2006 conference, September 17-21, in Miami Beach, Florida
New Generation Software:  Leading provider of iSeries BI and financial management software
Canvas Systems:  We build and deliver custom iSeries rental solutions

 


 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement