INZLIBL accepts a job description or user profile name and initializes the user portion of the library list according to the libraries defined for the job description. If a user profile name is passed, the job description name is retrieved from that user profile. ("*Use" authority is needed.) Leaving both parameters blank resets the library list according to the job description for your own user profile and skips the check for additional libraries; it is not the same as entering your own profile name as the User profile (USRPRF) parameter.
You may specify as many as three additional libraries to be added to the beginning or end of the list. These are retrieved from physical file INL001P according to the name of the calling program or, if they are called from a command line, the signed-on user name. A position of either *FIRST or *LAST (uppercase) and a dummy secondary key field (set to an arbitrary value of 0) need to accompany each library name entered on the file record. The latter prevents blanks from being stripped from the key when the Override with Database File (OVRDBF) command is used to position the file.
This utility is created from the four objects listed in Figure 1. The heart of the CL program, which does all the work, is the relatively easy-to-use Retrieve Job Description Information (QWDRJOBD) API. (See the OS/400 Work Management APIs V4R4 manual for more details.) The other key feature is a trick for making CHGLIBL work with a string of library names: Execute it via QCMDEXC!
Object | Source Type | Description |
INZLIBL | CMD | Command interface |
INL001C | CLP | Command processing program |
INL001P | PF | Store additional library names |
INL001H | PNLGRP | Help text for INZLIBL command |
Figure 1: Use these four objects to create the INZLIBL utility.
The CL program has been written with OS/400 V5 in mind. Data area QSS1MRI is used to retrieve the version, and, if it is V5 or above, the expanded library list (of 250 possible entries) is used. This utility has been successfully tested with V5R1 and can handle as many as 250 libraries. To enable V5R1 to support more than 25 libraries in the user portion of the library list, rename or delete data area QUSRSYS/QLILMTLIBL. Note, however, that doing this has a global effect on your system. More details are available on the IBM Web site at http://www.iseries.ibm.com/developer/os400/lib_list.html.
This utility is most likely to be useful in setting up working environments for your interactive session during the workday but could be called within an application program. In the latter case, be sure to monitor for escape message CPF9897, which is sent if the library list change is unsuccessful.
-- Phil Hope
LATEST COMMENTS
MC Press Online