MainframeSupports
tip week 36/2002:

In this weekly tip the use of the two TSO commands ALTLIB and EXECUTIL will be discussed. These two commands are closely related and you can have both benefits and problems by using them. I will end up with the conclusion that you should keep your REXX programs in their own libraries separated from your CLIST's. Then you should allocate your REXX libraries to SYSEXEC and CLIST libraries to SYSPROC and you should keep the number of concatenated libraries to a minimum. Read all of the following to understand why.

TSO ALTLIB can do a lot of stuff and the most important is that you can add further REXX or CLIST libraries to the concatenation of SYSEXEC and/or SYSPROC. Afterwards you can use ALTLIB to remove them again. The command TSO ALTLIB ACTIVATE APPLIATION(EXEC) DATASET('MY.OWN.REXXS') will make TSO look for REXX programs in MY.OWN.REXXS before any other libraries are searched. Then it will look in SYSEXEC and afterwards in SYSPROC. This new concatenation will be terminated when the REXX or CLIST issuing the ALTLIB terminates or when the command TSO ALTLIB DEACTIVATE APPLICATION(EXEC) is issued. In the parameter DATASET you can set up a concatenation of datasets. All this may not be new to you except that I seldom see the parameter APPLICATION(EXEC) used. The most common use is APPLICATION(CLIST). You can read more about ALTLIB in the TSO Command Reference manual.

TSO EXECUTIL doesn't have much functionality compared to ALTLIB, but it can decide whether libraries on the SYSEXEC concatenation should be opened and closed or not every time TSO looks for a REXX in SYSEXEC. Assuming that the TSO systems programmer at your site hasn't done anything special the default is that opening and closing is disabled. This is also the most efficient. This is also much better than the way the SYSPROC concatenation works where the datasets always are opened and closed for every search for a REXX or CLIST. If you want to be sure that your TSO session works the most efficient overruling any pecularities that your systems programmer may have made, you can issue a TSO EXECUTIL EXECDD(NOCLOSE). You can read more about EXECUTIL in the TSO Command Reference manual.

Now I hope you understand why it is a very good idea to use the SYSEXEC concatenation instead of SYSPROC. With the right setup it is far more efficient to search for and fetch REXX programs from SYSEXEC than from SYSPROC. The problem is that you cannot execute a CLIST that is fetched from SYSEXEC and this is why most installations keep REXX programs and CLIST's in the same libraries and allocate these libraries to SYSPROC. This is also why you see ALTLIB APPLICATION(CLIST) used all the time because then you don't have to worry about a CLIST popping up among all your REXX programs.

I once made some improvements to an application using a lot of REXX programs. By using ALTLIB APPLICATION(EXEC), EXECUTIL EXECDD(NOCLOSE) and placing the REXX programs in a separate library I cut off half the resource consumption measured in service units for the total application. Before the change the REXX programs were placed in the last library in the SYSPROC concatenation. I have also made some studies showing that it is ten times as costly in CPU time to load REXX programs from SYSPROC than from SYSEXEC. This large extra consumption comes from the opening and closing of datasets.

There is a little problem attached to the use of EXECDD(NOCLOSE). When a dataset on the SYSEXEC concatenation extents then TSO fails to notice this because the dataset is already open. The consequence is that you get some strange abends when you try to run the REXX that caused the extent to be taken. To minimize this from happening you must try to make as few updates to the SYSEXEC libraries as possible. You can also allocate those libraries with a lot of free space so they extent at rare intervals.

Previous tip in english        Sidste danske tip        Tip list