:>: -----Original Message----- :>: From: IBM Mainframe Discussion List [mailto:[email protected]] On :>: Behalf Of Grinsell, Don :>: Sent: Friday, May 23, 2014 9:02 AM :>: To: [email protected] :>: Subject: Friday Puzzler :>: :>: I have an end user job that is getting a JCL error and I know how to fix :>: it but I can't explain exactly why it's failing. I can recreate the :>: error with the following JCL: :>: :>: //STEP1 EXEC PGM=IEFBR14 :>: //DD1 DD DSN=F00.DUMMY,DISP=(NEW,PASS,DELETE), :>: // UNIT=TEMPSTOR,SPACE=(TRK,1),RECFM=FB,LRECL=80 :>: //STEP2 EXEC PGM=IEFBR14 :>: //DD1 DD * :>: RECORD1 :>: // DD DSN=F00.DUMMY,DISP=OLD :>: //STEP3 EXEC PGM=IEFBR14 :>: //DD1 DD DSN=F00.DUMMY,DISP=(OLD,DELETE,KEEP) :>: :>: F00.DUMMY gets allocated in STEP1 and is deleted at the end of STEP2 :>: causing STEP3 to get a JCL error. I can correct the situation by :>: specifying DISP=(OLD,PASS) in STEP2 or simply removing STEP3. My :>: question is why does the dataset get deleted in STEP2?
You need to look at the Normal Termination Disposition Subparameter section of the JCL reference. There are different actions depending on SMS vs non-SMS, temporary vs permanent, etc. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
