Removing or compressing a data set in an active LNKLST set

It is sometimes necessary to remove a data set from the active LNKLST set. Perhaps the data set is no longer needed, is causing a problem, or needs to be compressed. Use LNKLST DELETE to remove a data set. The data set cannot be removed while a LNKLST set is active (in use by at least one active address space). Use the following procedure to assure the data set being removed is not part of an active LNKLST set:

  1. Define a new LNKLST set identical to the one from which the data set is to be removed.
  2. Remove the appropriate data set from the new LNKLST set.
  3. Activate the new LNKLST set. This makes the new LNKLST set CURRENT on the system.
  4. Update all currently running jobs to use the current LNKLST set.
The following example shows how to remove a data set from an active LNKLST set:
SETPROG LNKLST DEFINE NAME(NEWLLSET) COPYFROM(OLDLLSET)
SETPROG LNKLST DELETE NAME(NEWLLSET) DSNAME(data set.to.be.removed)
SETPROG LNKLST ACTIVATE NAME(NEWLLSET)
SETPROG LNKLST UPDATE JOB(*) 
Note: Using UPDATE to switch LNKLST sets for an active job could result in fetch failures. IBM® suggests that you do this only when necessary.

When a new LNKLST set is made current, data sets that are no longer part of an active LNKLST continue to be managed by LLA. If you want LLA to no longer manage and to drop its allocation of a data set you have dynamically removed for all LNKLST sets, you must issue a MODIFY LLA,UPDATE=xx pointing to a CSVLLAxx member specifying the REMOVE keyword for the library removed from the LNKLST. Although stopping and starting LLA after the dynamic LNKLST removal of the data set causes LLA to drop its management and allocation of the data set, this also slows system performance. To avoid slowing system performance, use the MODIFY LLA command to change the library indexes.

When compressing non-LNKLST libraries, see the REMOVE statement in Statements/parameters for CSVLLAxx.