Dynamic Linklist, Done Properly

Dec 3, 2026

Mark Wilson is a globally recognized thought leader and international speaker in mainframe security and technology, as well as a passionate advocate for all things Z. He serves as the Chief Editor and Producer of Cheryl Watson's Tuning Letter and is the Technical Director at Vertali. He has more than 40 years’ experience across numerous industries and diverse mainframe environments. Mark is also Region Manager for GS-UK and has been awarded IBM Champion status for the last five years. For more information email: info@vertali.com

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
The first command creates LNKNEW as a copy of whatever is current. The second adds the new library to LNKNEW. Neither of those touches the running system. It’s only the third one, the ACTIVATE, that makes LNKNEW current, and even then, only for new work.

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,ALLOCATE
What UNALLOCATE is not for is getting at the data sets the active LNKLST is using. IBM is unusually blunt about this and puts its advice against it in bold. People do it anyway, because it removes the ENQ and the ENQ was what stood between them and the rename they wanted to do.

UPDATE, 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.

Note: A SET PROG=xx that points at a PROGxx member containing a LNKLST UPDATE statement carries exactly the same risk as the SETPROG command. Putting it in parmlib doesn’t make it any safer, although it does make it easier to review. Recommendation: In production, treat a LNKLST UPDATE as a change with IPL risk and put it through change control on that basis. If your CAB wouldn’t approve an unplanned IPL window for this change, it shouldn’t approve the UPDATE either.

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)
If XCFAS still holds an ENQ, the data set is still in at least one active LNKLST set. That happens if you didn’t do the UPDATE,JOB=* in step 1, or something is still running on an older set. Find out which set it is and use more of the same DEFINE, DELETE and ACTIVATE commands to deal with it. Don’t reach for UNALLOCATE. If LLA still holds an ENQ, it’s still managing the library. F LLA,REFRESH won’t get rid of that. You need to stop LLA or use a selective refresh, which I’ll come to. Once both are clear, do your rename, recatalog, compress or whatever it was you needed to do.

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

Submit a Comment

Your email address will not be published. Required fields are marked *

Sign up to receive the latest mainframe information

This field is for validation purposes and should be left unchanged.

Read More

AI-Powered WLM Cuts Batch Queue Time by Up to 70%

AI-Powered WLM Cuts Batch Queue Time by Up to 70%

What happens when Workload Manager can anticipate batch demand instead of simply responding to it? The latest issue of Cheryl Watson’s Tuning Letter leads off with findings from testing IBM AI-powered Workload Manager (WLM). The test used an AI model trained on 30...

Linux, Unix, Windows, and OS/2: How Demand Beat Design

Linux, Unix, Windows, and OS/2: How Demand Beat Design

The Rise of UNIX and Portable Computing  “OS/2” There. I said it. And I’ll say it again… but not right away so I don’t seem too fixated on something that inexplicably became an “also ran.” You know what it proved? A bunch of things, beginning with the fact that IBM is...