Sometimes I need to enlarge the concatenation of a DD name with an extra dataset. The task is to find out what the original concatenation looks like and then reallocate the DD name with the old concatenation plus an extra dataset. Normally the extra dataset will be placed in front of the old concatenation. This is an easy task to perform manually. But if I want to perform the enlargement at runtime, the following REXX may help:
This REXX uses the TSO command LISTALC STATUS to determine the current concatenation of the DD name supplied in parameter FILENAME. The second parameter is the dataset name you wish to use in front of the current concatenation of the DD name in parameter FILENAME. The DSNAME parameter must be a fully qualified dataset name. Imagine now that you always want your ISPF session to look in dataset MY.PANELS before ISPF considers other datasets allocated to ISPPLIB. The command TSO ENLARGE ISPPLIB MY.PANELS should do the trick.
Unfortunately you will discover that ENLARGE fails in the ALLOC command. This is due to the fact that all ISP*LIB DD name are opened by ISPF at startup time and remains open until ISPF terminates. You have to terminate ISPF in order to reach the TSO READY prompt. Here you can perform the command ENLARGE ISPPLIB MY.PANELS and then start ISPF again. Now ISPF will load panels from MY.PANELS before looking in the rest of the concatenation.