Swapping a load library in an active z/OS LNKLST can break program fetch. In this article excerpt from Cheryl Watson’s Tuning Letter, Mark Wilson explains why and where even IBM’s documented procedure carries IPL risk.
Why this article
IBM refreshed one of its support documents in July 2026, “Using the dynamic LNKLST facility safely and properly.” It’s been knocking around in one form or another for years, and it’s one of those documents every sysprog should read once, and most of us only find after something has gone wrong.
I picked it because dynamic LNKLST is a facility where the commands are easy and the consequences aren’t. A SETPROG takes a few seconds to type. Working out afterwards why half your started tasks are failing in program fetch can take rather longer, and sometimes the answer is an IPL you hadn’t planned for.
This article is for z/OS systems programmers, and the people who approve their changes, who need to rename, recatalog, delete, compress or swap a data set that sits in an active LNKLST.
If you’ve ever been asked to “Just drop the new version of the vendor load library in” without an IPL, this article is for you.
Terminology
- LNKLST: The system-wide concatenation of load libraries that gets searched when a program isn’t found in the job’s own libraries or the link pack area. Set up at IPL from PROGxx.
- LNKLST set: A named LNKLST concatenation. Dynamic LNKLST lets you define more than one.
- Current LNKLST set: The one that newly started jobs and address spaces pick up.
- Active LNKLST set: Any LNKLST set still being used by at least one job. A set you’ve replaced as current stays active until the last job using it ends, which on a system with long-running started tasks could be the next IPL.
- LLA: Library Lookaside. By default, it caches the directory entries for LNKLST data sets so program fetch doesn’t have to go and read the directory on DASD every time.
- DEB: Data Extent Block. Built when a data set is opened, and it records which volume the data set is on and where its extents are. LNKLST processing and LLA each have their own.
- SYSDSN ENQ: The data set level ENQ. Dynamic LNKLST allocates every data set in a LNKLST set, and those ENQs are held by the XCFAS address space. LLA holds its own ENQs on the libraries it manages.
How dynamic LNKLST is meant to work
Dynamic LNKLST arrived in the 1990s so you could add a new product’s libraries without an IPL. The model is simple. You define a new LNKLST set, change it, and activate it. Anything that starts after that gets the new set, and anything already running carries on with the one it started with.
So, adding a library looks like this:
SETPROG LNKLST,DEFINE,NAME=LNKNEW,COPYFROM=CURRENT
SETPROG LNKLST,ADD,NAME=LNKNEW,DSN=SYS2.VERTALI.LOADLIB
SETPROG LNKLST,ACTIVATE,NAME=LNKNEW
Recommendation: Before and after any of this, issue D PROG,LNKLST,NAMES to see which LNKLST sets are defined, and which are still in use. It’s a lot easier to plan a change when you know how many old sets are still hanging about.
The ENQ, and what UNALLOCATE is for
Because dynamic LNKLST allocates each data set in the set, you get a SYSDSN ENQ on every one of them. That’s a good thing. It stops anyone opening a LNKLST data set with DISP=OLD and changing it underneath the system.
The side effect is that the ENQ is on the name, not the volume. So, it also blocks ordinary maintenance against an uncataloged data set with the same name on a different volume, which is exactly what you have when you’re working on an alternate set of system libraries.
That’s the problem the UNALLOCATE and ALLOCATE parameters solve:
SETPROG LNKLST,UNALLOCATE
(work on the same-named, uncataloged copies on the other volume)
SETPROG LNKLST,ALLOCATEUPDATE, the emergency lever
There’s one more parameter that matters here. SETPROG LNKLST,UPDATE,JOB=jobname moves a running job off the LNKLST set it started with and onto the current one. JOB=* does it for every job on the system. The trouble is that the job is in flight when you do it. If it’s in the middle of fetching a module when the ground moves, it can fail, and IBM’s position is that this risk is inherent and can’t be prevented. The fetch errors can be bad enough to need a re-IPL. The documentation says don’t use UPDATE unless you’re prepared to accept that, and they mean it.IBM’s position is that this risk is inherent and can’t be prevented.
If you do have to use it, add DELAY. DELAY=10 gives fetches that are already under way time to finish before the old control blocks are cleaned up. It reduces the risk. It doesn’t remove it.
Why an active LNKLST library swap can break program fetch
Here’s the sequence IBM uses as its example of what not to do, and I’d bet most of us have seen something like it in a runbook somewhere. The aim is to replace SYS2.VERTALI.LOADLIB with a new version of the same name:
SETPROG LNKLST,UNALLOCATE
STOP LLA
(rename SYS2.VERTALI.LOADLIB to SYS2.VERTALI.LOADLIB.OLD)
(rename SYS2.VERTALI.LOADLIB.NEW to SYS2.VERTALI.LOADLIB)
SETPROG LNKLST,ALLOCATE
START LLA,SUB=MSTR
It looks tidy. The LNKLST ENQ is dropped, LLA is stopped so its ENQ goes too, the renames go through, and then everything is put back. And afterwards you start getting ABEND106 and ABEND0F4 in program fetch.
The reason is the DEB. When a LNKLST set is activated, LNKLST processing records in its DEB where each data set lives, volume and extents. Nothing in that sequence updates it. A rename changes the name of a data set, not where it is, so the LNKLST DEB is still pointing at the old library’s extents.
LLA, on the other hand, opens its libraries afresh when it starts. It goes looking for SYS2.VERTALI.LOADLIB by name, finds the new one, and builds its directory cache from that.
So now LLA is describing the new library and the LNKLST is reading the old one. Fetch gets a directory entry from one data set and goes to read the module from another.
It’s a bit like swapping the name plates on two front doors. The postman with the new list goes to one house, the postman with yesterday’s list goes to the other, and both of them are quite sure they’re right.
IBM’s test-system procedure for replacing a LNKLST data set
Use the dynamic LNKLST commands to take the data set out and put it back. That lets LNKLST processing rebuild its control blocks. It’s three steps. I’ll stick with SYS2.VERTALI.LOADLIB.
Note: IBM presents this sequence as an example for test systems where you can live with the risk of an unplanned IPL. The procedure uses UPDATE,JOB=* twice. As we covered earlier, DELAY reduces the risk of program fetch failures, and an IPL may still be needed.
Step 1. Take the data set out of LLA and out of the current LNKLST.
STOP LLA
SETPROG LNKLST,DEFINE,NAME=LNKOUT,COPYFROM=CURRENT
SETPROG LNKLST,DELETE,NAME=LNKOUT,DSNAME=SYS2.VERTALI.LOADLIB
SETPROG LNKLST,ACTIVATE,NAME=LNKOUT
SETPROG LNKLST,UPDATE,JOB=*,DELAY=10
Step 2. Check the ENQs have gone, then do the work.
D GRS,RES=(SYSDSN,SYS2.VERTALI.LOADLIB)Step 3. Put the data set back and restart LLA…
In the final step, Mark Wilson shows how to return the updated library to LNKLST and bring it back under LLA management. He also covers when you can use selective refresh to keep LLA running throughout the change.To read the full article for free, fill out this form.
To read all the articles covering z/OS for more than 30 years, subscribe to Cheryl Watson’s Tuning Letter.







0 Comments