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. Since &&T1 went to VIO in the first test, I ran it again with the file going to DASD. Allocations for the two &&T1 files were SMS managed, went to different disk volumes, and had identical names. Again, the first &&T1 file was the one copied to SYSOUT both times. For validation, I changed steps 3 and 4 to use data set name &&T2. Steps 2 and 4 provided different SYSOUT data as expected. Sure, there are multiple ways to avoid this issue, such as using different temp names or using DISP=(OLD,DELETE) in steps 2 and 4. That's not the issue. That's already taken care of. The issue is that the behavior is unexpected and contrary to the documentation. Has anyone run into this before and found the behavior documented somewhere? ---------------------------------------------------------------------- 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

