A Few Of My Favourite Things
MartinPacker 11000094DH Visits (4272)
We recently went to z/OS 2.1 on our Production system in Greenford. And just last week I threw into Production some JCL that used two of the new z/OS 2.1 JCL changes, plus an oldie that might have escaped your attention.
Now we are firmly on 2.1 we can exploit them, with the certainty of not having to revert them. I expect many of you are in a similar position.
So here they are, with the context in which I’m using them.
The Problem I Was Solving
These typically can be a few tens of cylinders in size so leaving them lying around is not good. Also we don’t know their name.
The question becomes how to delete them in the same step or a follow on step in the same job.
And I want to do this as SYSIN in a PROC, just to make it worse.
Deleting With A Mask
I can achieve what I want with
if I can get &MYHLQ to resolve to the userid the job ran under. This is the userid under which all those transient data sets are created.
Of course you want to be careful with the mask.
What I can’t do - which would’ve been perfectly valid is to code
because that requires me to supply the catalog name. I really don’t want to code that in the DELETE command.
SYSIN In A JCL Procedure
As you’d expect, you code something like
This, obviously, is much better than copying SYSIN to a temporary data set before the PROC gets invoked. Plus it allows for customisation, which brings me to the next capability.
Symbol Substitution In A SYSIN Data Set
This requires only a small change:
and it works fine.
The one remaining piece of the puzzle is to set
using the built in symbol
I’ll confess I don’t know what happens if I try using
They solved a real problem. More to the point, I now know how to use them, so I’ll be using them a lot.
And I guess you might use them, too.
By the way, I don’t claim to be a particularly accomplished JCL writer, so some of what I’ve written above you can probably do better another way.
One final point: The fact that TSO DELETE MASK dates back to the R.11 era was a complete surprise to me; Who knows what nuggets lie in z/OS that you hadn’t realised existed?