• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • 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.

    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.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    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

    IBM Offers Contingency Planning Assessment Service for Pandemics Happy 18th Birthday, AS/400; Time to Leave the Nest

    Leave a Reply Cancel reply

Volume 6, Number 23 -- June 14, 2006
THIS ISSUE SPONSORED BY:

T.L. Ashford
iTera
COMMON

Table of Contents

  • New in V5R4: OLAP Ranking Specifications
  • Avoid Locked Display Files/Resetting Page Numbers
  • Admin Alert: How to Set i5 Library Lists for 5250 and Batch Jobs

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle