I usually use IDCAMS to delete a tape, but in this JCL, I wish to use the SET to set up a variable for the tape dataset name. I am using that name in several job steps, so it makes it easier, plus I might change the name - and it minimizes what I need to change.
But I can't use a set variable in IDCAMS (for sysin)
So, I thought I would use IEFBR14 which works, unless the file is a tape. Is there any way to avoid the tape mount when I use IEFBR14?
Or maybe another quick way to delete a tape file where I could use a set variable?
However, I did do some more research after posting this question, and I found out z/OS v2r1 has added the JCL EXPORT statement which allows JCL and system variables to be included/interpreted in SYSIN data. So, that is what I did, and it works great.
For anyone else with this question, here is a link to the article that I found on this: