Just for fun, I asked ChatGPT how to remove a dataset from the linklist on z/OS:

To remove a dataset from the linklist on z/OS, you need to update the LNKLST concatenation, which defines which datasets are part of the system linklist (i.e., the set of libraries searched to resolve load module names when they are not found in the task’s STEPLIB or JOBLIB).

Here's how you can remove a dataset from the linklist on z/OS:

Step-by-step Process
1. Identify the Active LNKLST
Use the DISPLAY LNKLST command to check the active linklist concatenation:

// On the system console or SDSF command input
D LNKLST
This shows the current LNKLST set in use.

2. Update the PROGxx Member in PARMLIB
The linklist is defined in the PROGxx member in your system PARMLIB (e.g., SYS1.PARMLIB or similar).

Go to your system PARMLIB.

Edit the PROGxx member used at IPL (or the one that will be used during dynamic update).

Remove the dataset from the LNKLSTxx member that is included via the LNKLST=(xx[,yy...]) parameter in the PROGxx member.

Example snippet of a LNKLSTxx member:

LNKLST ADD NAME(LST1) DSNAME(SYS1.LINKLIB)
LNKLST ADD NAME(LST1) DSNAME(SYS1.MYLIB)
LNKLST ADD NAME(LST1) DSNAME(SYS1.OTHERLIB)
If you want to remove SYS1.MYLIB, delete that line.

3. Activate the Changes (Dynamically or via IPL)
Dynamically via SETPROG LNKLST
You can update the linklist dynamically using the SETPROG LNKLST command:

// Prepare the new LNKLST set
SETPROG LNKLST,UNALLOCATE
SETPROG LNKLST,DEFINE,NAME=NEWLIST,DSNAME=(SYS1.LINKLIB,SYS1.OTHERLIB)
SETPROG LNKLST,ACTIVATE,NAME=NEWLIST
Or via IPL
If you prefer to activate it during the next IPL, ensure your changes are in the PARMLIB members that will be used and reboot the system.

Verification
After applying changes, verify with:

// On the system console
D LNKLST
Ensure the dataset you wanted to remove no longer appears.

Let me know if you're using IEAOPTxx to define dynamic LNKLST behavior or need help creating backup copies before editing.



how do I create a backup


To create a backup of a PARMLIB member (like PROGxx or LNKLSTxx) on z/OS, you can do this easily using ISPF/PDF panels (option 3.4 or 2), TSO commands, or JCL.

Here are a few common ways to back up a member:

Method 1: ISPF Copy (Option 3.3 or 3.4)
Go to ISPF option 3.4

Enter your PARMLIB dataset name (e.g., SYS1.PARMLIB)

Press Enter to list members

Type C (for Copy) next to the member you want to back up (e.g., PROG00)

In the "To" fields:

Use the same dataset and give it a new name like PROG00.BAK, or

Use a different dataset altogether

This is the fastest and safest way to copy a member interactively.

Method 2: TSO COPY Command
On the ISPF Command line or TSO prompt:

COPY 'SYS1.PARMLIB(PROG00)' 'SYS1.PARMLIB(PROG00.BAK)'
This creates a backup named PROG00.BAK in the same dataset.

Method 3: JCL Example
If you want to do it via a batch job, here's a simple IEBGENER example:

//BACKUP   JOB ...
//COPYMEM  EXEC PGM=IEBGENER
//SYSUT1   DD DSN=SYS1.PARMLIB(PROG00),DISP=SHR
//SYSUT2   DD DSN=SYS1.PARMLIB(PROG00BKP),DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
Make sure the target member (PROG00BKP) does not already exist if you're not okay overwriting it.

Optional Tip: Use a Different Dataset for Backups
Many sites use a dataset like:

SYS1.PARMLIB.BACKUP
Then copy your original member into that:

COPY 'SYS1.PARMLIB(PROG00)' 'SYS1.PARMLIB.BACKUP(PROG00.20240526)'
You can include the date in the member name for version tracking.

Let me know if you want a batch job that backs up multiple members, or if your site uses SMP/E to manage system libraries (which might require more caution).


--
Andrew Rowley
Black Hill Software

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to