How to dynamically add or remove libraries from APF list

Countless times I’ve been asked if I remember the command to dynamically change the APF list.

Well, I’ve decided to include it here so that next time someone asks me I can tell them to come here. 🙂

Now, this can be done in many different ways but I normally follow this path:

1. Add/Remove just a few libraries to APF list

If the number of libraries we’re talking is not much, then we can do it by issuing the following commands for each of the libraries (datasets):

To add:  SETPROG APF,ADD,DSNAME=dataset_name,VOLUME=volser

To remove:  SETPROG APF,DELETE,DSNAME=dataset_name,VOLUME=volser

Notes:

  1. If the datasets are in an SMS managed volumes then instead of VOLUME=volser it should be SMS.
  2. If the system is IPLed and you did not reflect the changes to your PROGxx member in PARMLIB then these changes will be lost.

2. Add/Remove lots of  libraries from APF list

If we’re talking of a considerable number of libraries then the best way is to update the PROGxx member of PARMLIB and then activate it dynamically.

Let’s assume:

PARMLIB: SYS1.PARMLIB

PROGxx: PROG00

In this case we would do the following:

  1. Update SYS1.PARMLIB(PROG00) and add/remove the libraries from APF list
  2. Issue command: SET PROG=00

1 Comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.