• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Set Your Library List From A Job Description

    August 18, 2015 Ted Holt

    Note: The code accompanying this article is available for download here.

    On August 4, 2015, I asserted that the proper residence of a library list is a job description. Talk is cheap. Now it’s time for me to put my money where my mouth is. I have a utility that gives me easy access to the library lists in job descriptions. I wrote this utility last year, and now I use it daily with great results. Today I make that utility freely available for you to use in your shop.

    If I were to follow IBM’s naming convention, I would probably call my utility CHGLIBLFRMJOBD, but that name exceeds the 10-character limit, and besides, it’s too much to type. I call the utility LLJD, and it consists of three objects:

    1. LLJD: the command interface
    2. LLJDC: the CL program that changes the library list
    3. LLJDH: help text

    It also uses Brian Rusch’s magnificent commands MOVPGMMSG and RSNESCMSG. If you missed those, see the link in the related stories below.

    LLJD accepts two parameters:

    1. The qualified name of a job description
    2. A current library

    Job descriptions don’t define a current library, but leaving a current library in the library list can produce undesirable results, so I added the second parameter.

    Here’s an example:

    LLJD  JOBD(QGPL/MYJOBD) CURLIB(MYLIB)
    

    The JOBD parameter tells the system to set the user portion of the current job to the library list found in job description MYJOBD in library QGPL, and also to set the current library to MYLIB.

    Both parameters default to a value of *USRPRF, which means that LLJD should set the library list and current library to the values that are assigned to the current user profile. Therefore, entering LLJD without any parameters is a quick way to reset an interactive job to the values it had at sign-on.

    As with all code that you get from others, test thoroughly and use at your own risk. If you find bugs or have suggestions for enhancements, please let me know.

    RELATED STORIES

    Where Do Library Lists Reside?

    CL Error-Handling With APIs

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    ARCAD Software

    New Podcast Dedicated To IBM i DevOps!

    The topic of this IBM i DevOps TechTalk is “Moving to Git.” It features Jeff Tickner, Ray Bernardi, and Alan Ashley as they discuss what is Git and how to best use Git with the IBM i. Listen in for tips on:

    • Key Git Advantages
    • Git Considerations for a successful implementation
    • Working with branches and automated merges
    • Getting started and ARCAD’s Centralized approach

    Listen NOW

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    LaserVault:  WEBINAR: Get Faster, Easier IBM i Backups & Restores GUARANTEED. Aug 20
    Four Hundred Monitor Calendar:  Latest info on national conferences, local events, & Webinars
    System i Developer:  Session Grid Posted: RPG & DB2 Summit - Chicago, October 20-22

    Magic Software Rises Despite Devaluing U.S. Dollar Sony Ends MO Production–What Are Your Long-Term Archive Options Now?

    Leave a Reply Cancel reply

Volume 15, Number 16 -- August 18, 2015
THIS ISSUE SPONSORED BY:

WorksRight Software
SEQUEL Software
Storagepipe

Table of Contents

  • An Introduction to Processing XML With RPG, Part 2
  • Set Your Library List From A Job Description
  • RCAC in DB2 for i, Part 1: Row Access Permissions

Content archive

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

Recent Posts

  • Unattended IBM i Operations Continue Upward Climb
  • VS Code Is The Full Stack IDE For IBM i
  • Domino Runs on IBM i 7.5, But HCL Still Working on Power10
  • Four Hundred Monitor, March 6
  • IBM i PTF Guide, Volume 25, Number 11
  • You Ought To Be Committed
  • Thoroughly Modern: What You Need to Know About IBM i Security
  • Spring Brings Events To IBM i Community, And More
  • As I See It: AI-AI-O
  • IBM i PTF Guide, Volume 25, Number 10

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 © 2023 IT Jungle