MainframeSupports
tip week 23/2003:

I never thought of writing this tip, but one day somebody asked me why I often put a % in front of my TSO commands. This guy has over ten years of mainframe experience.

If you don't put a % in front of your TSO command then TSO starts looking for a LOAD module with the name of your TSO command. If TSO doesn't find a LOAD module then it starts looking for a REXX with the name in the SYSEXEC concatenation and at last TSO looks in the SYSPROC concatenation for a REXX or CLIST with that name. When you use the % in front of the command name then TSO skips the search for LOAD modules and jumps directly into SYSEXEC and if it was a miss searches SYSPROC at last.

How can you benefit of this knowledge? First of all you can save ressources (if you are concerned about that, I am) and secondly you can make and execute REXX programs or CLIST programs with the same name as real LOAD module TSO commands. Actually you are able to call the original LOAD module TSO command with the same name from within your REXX/CLIST. I have used this technique to trap the output from the original TSO command and present it in a more convenient way.

Let me give you an example. The TSO command TSO LU gives you a list of all the RACF groups you are connected to. The output is often many pages long and very often you may skip the RACF group name you are looking for. I have made a REXX called LU which I can execute using TSO %LU. My LU REXX traps the original output from the TSO LU command and puts it on to an ISPF panel where I can browse the output using standard ISPF tools. Watch out for more info on my site about trapping output from TSO commands.

Previous tip in english        Sidste danske tip        Tip list