• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Reader Feedback on Setting Library Lists

    June 21, 2006 Joe Hertvik

    For my column on How to Set i5 Library Lists for 5250 and Batch Jobs, several readers immediately wrote in to ask questions, provide more information, and even to question why I would cover such a basic topic. Let’s take a look at some of the feedback I received on that column and see what else it teaches us about library lists.

    Hey, Joe:

    You seemed to indicate that a user program cannot utilize the Product Library list feature in a library list, but I’ve found that you can configure an individual command to create a Product Library list entry whenever that command is executed. This is done when you create or change a command by using either the Create Command (CRTCMD) or Change Command (CHGCMD) commands.

    There is a parameter for i5/OS and OS/400 command objects called Product Library (PRDLIB), which is updated by using CRTCMD or CHGCMD. When you run a command with a valid library name in the PRDLIB parameter, i5/OS adds that PRDLIB value as a Product Library list entry into the user’s library list, and that library remains in their library list until the command finishes running. Once the command ends, the library is removed from the list. I frequently use this technique to insert a library into the Product Library list for my utility commands.

    —R.D.

    This is a cool technique that I tested out by creating a simple command in my shop that uses the UTILLIB library as its product library. I first created the command by using the following CRTCMD command on my i5 partition.

    CRTCMD CMD(command_lib/command_name) PGM(program_lib/command_pgm) SRCFILE(source_lib/QCMDSRC) PRDLIB(UTILLIB)

    Note that I entered UTILLIB into the Product Library parameter (PRDLIB). This tells i5/OS that when this command starts running, it should insert UTILLIB into a Product List entry for the user’s library list.

    Then I ran the command and, while inside the command screens, I performed a system request-3 (Display Job) and took option 13, Display Library List, if active, to view my library list. Sure enough, the UTILLIB library was now added to my library list as a Product Library list entry (type ‘PRD’). Once I exited the command, UTILLIB was removed from the list, which I again verified by taking option 13 inside the Display Job function.

    Next, I attempted to change the Product Library list entry for that command to another library named LIB2. I did this by running the following Change Command statement:

    CHGCMD CMD(command_lib/command_name) PRDLIB(LIB2)

    I then ran the command again and, as advertised, LIB2 was now in the Product Library list instead of UTILLIB. Once I exited the command, LIB2 was removed from my library list.

    So the technique works pretty well for allowing your commands to tell i5/OS and OS/400 what product library they need. What I like about it is that it doesn’t junk up your system or user library lists with additional libraries, and it cleans up after itself by removing the product library from your lib list when it’s done. Give it a try. You’ll like it.

    One final note on using CRTCMD and CHGCMD to modify library lists. These commands also contain a Current Library parameter (CURLIB) that allows you to change the user’s current library while they execute a command, similar to how you modify Product Library list entries when a command starts. So you can also modify your commands to change their current libraries on the fly.

    Hey, Joe:

    In your article, you said that “The job’s current library is the first user library in the list.” If the following conditions occur, can you tell me which library is the first library searched in the user part of my library list?

    • I set *CRTDFT in the Current Library parameter (CURLIB) of the user profile; and
    • I set the user library list by entering a library list in the job description attached to the user profile, and the first library in the job description library list is LIB1

    I also understand from your article that the current library is used as the default library for accessed commands and objects that designate *CURLIB as their library value. So which library would be my default *CURLIB value if the user profile designates *CRTDFT as its user profile Current Library parameter?

    —Ken

    To take your questions in order, LIB1 would always be the first library searched in the user part of your library list when CURLIB is equal to *CRTDFT. This is because, by default, there is no current library entry specified in a user’s library list when the CURLIB parameter of the user profile contains the *CRTDFT value. To prove this, if you display the library list for a user who has a *CRTDFT Current Library value; that library list will not contain a type ‘CUR’ library entry.

    Regarding which library is used for operations that designate *CURLIB as their library value when the user profile contains *CRTDFT in its CURLIB parameter, the QGPL library is always used as the default current library in that situation. So *CURLIB would be set to QGPL for your second question.

    Hey, Joe:

    It’s interesting that you needed to dedicate an article to Library Lists. I realize that i5/OS newcomers may not be aware of the nitty gritty details of lib lists and that a refresher course is helpful, but the tone of the article seemed aimed at administrators who didn’t know anything about library lists. Has the system slipped so far toward the Dark Side (that is, the PC side) that understanding library lists is now arcane knowledge? Or has the i5 educational process slipped so far that “Library Lists 101” is no longer required reading? Just curious.

    —Paul

    I understand your sentiment but, yes, it’s true. There are people who are in charge of i5, iSeries, and AS/400 machines who haven’t had any training on library lists. And worse, I found that there didn’t seem to be any good free primers out there. It seemed that many of the library list articles I found assumed that the readers already knew everything about library lists. Hence, my attempt at a basic library list article, which was aimed at a knowledgeable system administrator who didn’t grow up in an OS/400 and i5 environment. While it might not be your cup of tea, it’s my hope that there are some people who can benefit from it.

    HTH.

    –Joe

    RELATED STORY

    How to Set i5 Library Lists for 5250 and Batch Jobs

    Share this:

    • Share on Reddit (Opens in new window) Reddit
    • Share on Facebook (Opens in new window) Facebook
    • Share on LinkedIn (Opens in new window) LinkedIn
    • Share on X (Opens in new window) X
    • Email a link to a friend (Opens in new window) Email

    Tags:

    Sponsored by
    ARCAD Software

    [IBM i Auditing Tool] Discover the Health of Your IBM i Applications in Minutes with ARCAD iCheck-up

    How well do you really know the health of your IBM i applications? Hidden complexity, unused code, and synchronization issues can make maintenance more challenging and slow down modernization efforts.

    What if you could identify these issues in just a few clicks, without installing anything on your IBM i system?

    Meet ARCAD iCheck-up, an auditing tool designed to give IBM i teams a clear, actionable overview of their applications in minutes.

    With iCheck-up, you can:

    • Assess code complexity: Identify complex source files and prioritize refactoring efforts.
    • Detect dead code: Uncover unused code that may be cluttering your applications.
    • Spot synchronization issues: Identify inconsistencies between source files and compiled objects.
    • Track code changes: Explore modification history and better understand your application’s evolution.
    • Generate a shareable report: Get a comprehensive, easy-to-read HTML report with key metrics and insights.

    Fast, simple, and secure. iCheck-up runs from Windows, requires no installation on your IBM i system, and leaves no files or code behind. Your generated report contains metrics only, keeping your source code confidential.

    Whether you’re maintaining existing applications, planning modernization, or looking to improve code quality, iCheck-up helps you make more informed decisions.

    Ready to gain deeper insights into your IBM i applications? Discover ARCAD iCheck-up and take the first step toward better code quality today!

    Share this:

    • Share on Reddit (Opens in new window) Reddit
    • Share on Facebook (Opens in new window) Facebook
    • Share on LinkedIn (Opens in new window) LinkedIn
    • Share on X (Opens in new window) X
    • Email a link to a friend (Opens in new window) Email

    Sponsored Links

    iTera:  High availability solution for $50 a day - includes IBM System i5 Hardware
    COMMON:  Join us at the Fall 2006 conference, September 17-21, in Miami Beach, Florida
    LANSA:  An entirely different approach to application modernization and innovation

    Autostarting WAS 6.0 on the System i IBM Reverses Course, Keeps S/3X Compilers in i5/OS V5R5

    Leave a ReplyCancel reply

Volume 6, Number 24 -- June 21, 2006
THIS ISSUE SPONSORED BY:

ProData Computer Services
WorksRight Software
COMMON

Table of Contents

  • Guru Readers Contribute Their Favorite SEU Tips
  • Autostarting WAS 6.0 on the System i
  • Reader Feedback on Setting Library Lists

Content archive

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

Recent Posts

  • Bob Code Assistant Gets Better Understanding Of IBM i Applications
  • IBM i In The Cloud And The Case For Reversing Replication
  • Guru: From Hiking Boots To Long-Term Memory
  • Inside IBM’s New PowerHA Cloud Offering, Full System Manager
  • IBM i PTF Guide, Volume 28, Number 39
  • Power Systems Turns In Another Great Quarter
  • Big Blue Is Right On Schedule With Fall 2026 IBM i Tech Refreshes
  • Guru: Environment Variables – Global Variables Wearing Hiking Boots
  • A New IBM i Entity Takes Shape: Power By Fortra
  • IBM i PTF Guide, Volume 28, Number 38

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