Update Linklist dynamically

Some people dread the idea of having to update the Linklist dynamically but in fact it’s a very simple process:

  1. Update the PROGxx member that your system uses from PARMLIB:
    • Add/remove libraries as required
    • Change the LNKLSTnn reference to LNKLSTnn+1
  2. Issue the following MVS commands:
    • P LLA
    • SET PROG=xx
  3. To make sure the libraries have been added /removed from the Linklist, issue the MVS command: D PROG,LNKLST


Let’s suppose your system is using SYS1.PARMLIB(PROG00) and the Linklist area in use is LNKLST00.

These would have to be the steps to follow:

  1. Edit SYS1.PARMLIB(PROG00) and add/remove the libraries you want from the Linklist area.
  2. Change all LNKLST00 references in SYS1.PARMLIB(PROG00) to LNKLST01.
  3. Issue the following MVS commands:
    • P LLA
    • SET PROG=00


Click here to check why we need to stop LLA and unallocate the LNKLST.


  1. Good to know… I guess you can teach an old dog new tricks… I am one of the OLD sysprogs that still thought it was not a good thing to play around with the linklist. You have educated me and and i appreciate it. Let me know if you need any help with anything. I will try to monitor your website as much as possible.

    Your new friend,

  2. Thanks Pete!!! I really appreciate the fact that this site is being helpful and useful.

    If you keep your PROGxx member that contains the LNKLST00 set you can activate it any time after the IPL.

  3. Rui, as usual, another great explanation… this is what I thought would need to be done, but it is wonderful to have confimation. I am also assuming that i could go back to LNKLST00 after an IPL. The reason for so much concern is that the dataset I am dealing with is a dataset that VTAM uses, so obviously I can’t just recycle…LOL… Thanks again for all of your help.


  4. Hello again Pete!

    I’m glad you make all these questions because it gives me ideas for new subjects to write about.

    Now, to try and answer your questions:

    If a dataset is in linklist the only way to move it to a different volume is first to remove the LLA and XCFAS ENQs – by stopping LLA and do the UNALLOCATE LNKLST -.

    In this case since you are moving the dataset to a different volume and not removing or adding it to the Linklist the process of dynamically updating the Linklist is different. Moving a dataset does not change the list of datasets defined to the current concatenation in any way – the dataset name remains the same -. The system will continue to use the current Linklist set as is and will not rebuild the concatenation.

    The Volume parameter is only used for datasets cataloged in user catalogs at IPL time – SYS1 datasets are always in Master Catalog and therefore do not require the Volume parameter -. After IPL, to build the Linklist set the system used the catalog information. To make a change to any dataset that is part of an active linklist set, you have to first remove it from the linklist set. When it is no longer part of an active concatenation, then you can modify it however you wish and then add it back in.

    So, in order to move a Linklisted dataset to a different volume you would have to:

    1. Define a new linklist set without the dataset you wish to recatalog.
    2. Activate/implement it.
    3. Move your dataset.
    4. Define a linklist set with the dataset you’ve moved.
    5. Activate/implement this new set.

    Here’s an example of the commands you would use:

    1) P LLA
    3) Create a PROGT1 containing the LINKLIST members EXCEPT the one we want to move and rename LNKLST0x to LNKLST0x + 1
    4) SET PROG=T1
    6) Move the dataset into a different volume.
    7) Create a PROGT2 containing the LINKLIST members INCLUDING the one we’ve moved to a different volume and increment the LNKLSTxx value (LNKLST0x + 1).
    8 ) SET PROG=T2

  5. Rui, thank you for your update. I still have one scenario that I have questions on. I understand the above procedure when adding or deleteing a DSN, but will this cover if you are moving a dataset from one volume to another?? Will I be able to move the dataset after the “Unallocate” and “p LLA” commands are issued?? Will there be any concerns in executing the “s lla” and “Allocate” commands. Would I also need to change the LNKLST00 to LNKLST01 if I don’t add or delete any datasets from the list. FYI, the datasets are SYS1, so they don’t have the volume reference in PROG00. Sorry for all the questions, but I do appreciate how well you do answer the questions i have asked previously. Look forward again to your replies and thanks.


  6. Thanks for the compliments Pete! I’m glad you like it.

    Now, to better try to explain this process:

    Each Linklist dataset has an ENQ from both XCFAS and LLA. An ENQ on a LNKLST dataset prevents that dataset from being altered as long as it is a member of an active LNKLST. So, in order to be able to make changes to the active Linklist you first need to remove those ENQs.

    To be able to remove the LLA ENQs you need to stop the LLA. The only impact that stopping the LLA has in the system is loss of performance until you re-start the LLA.

    As per the XCFAS ENQs to remove them you need to issue the SETPROG LNKLST UNALLOCATE command. Unallocate indicates that you want to undo all existing allocations obtained while processing active LNKLST sets.

    Once you remove the ENQs you are then able to change the Linklist. Now, bear in mind that although you have removed the ENQs the modules are still in Linklist. No abend will come out of this.

    Once you are finished with the Linklist changes, you then restart the LLA and ALLOCATE the Linklist.

    The UPDATE command indicates that the system is to update an address space so that a specified job or jobs associated with that space can use the current LNKLST set. If the job is using another LNKLST set when the current LNKLST set is activated, it will continue to use the original LNKLST set until it completes operations. When the job completes and restarts, it then uses the datasets defined in the new currently active LNKLST set.

  7. Very good website Rui… I do have a question about the linklst update. What would happen if something required a reference to a dataset in the linklist while you had the linklist unallocated and LLA stopped?? Would this not cause “module not found” abends?? Looking forward to your answer. Thanks again for your work on this website.


Leave a Reply

Your email address will not be published.


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