Martin Kline wrote:
We recently had a job using duplicate temporary data set names and got some really unexpected results. I didn't find this behavior documented anywhere, thus the post.

First, to validate the results, I created a simple four-step job. All four steps use IEBGENER. Step 1 creates a temporary data set named &&T1 with DISP= (NEW,PASS). Step 2 copies &&T1 using DISP=(OLD,PASS) to SYSOUT. Step 3 repeats step 1, also with data set name &&T1 and DISP=(NEW,PASS), but with different data going to the SYSUT2. Step 4 copies &&T1 to SYSOUT. All steps ran with return code zero. The result is that steps 2 and 4 copied the same &&T1 to SYSOUT both times. The second &&T1 data set was apparently simply discarded. The generated data set name for &&T1 was the same for all steps. The JCL reference indicates I should have gotten a duplicate data set name JCL error. But I did not.

Others have explained why you got the first temp file, but
I am  curious to see what you read in the JCL reference.
Can you specify  what you read? You have always been able
to create duplicate datasets, just not on the same volume.
You can't catalog more than one, but you can create as many
as you have volumes. This used to be a big problem, a job
would fail, and would be re-run without cleaning up the
datasets. You would end up with lots of them scattered over
the volumes. The job would get a message indicating a catalog
failure, but that wasn't always noticed. If you referenced the
dataset through the catalog you wouldn't  get the latest version.
SMS mostly fixed this for permanent datasets because they had
to be cataloged, and were cataloged at create time instead of
step end. But temporary datasets aren't cataloged even with
SMS.

--
Richard

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to