Don,

Check the JCL reference manual under DD DISP parameter.  If you have an OLD 
permanent dataset that was PASSed to the step, the normal disposition is DELETE 
if the dataset was originally new.  

Rex

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of J R
Sent: Friday, May 23, 2014 11:15 AM
To: [email protected]
Subject: Re: Friday Puzzler

DISP=OLD in STEP2 defaults to KEEP, so dataset is no longer in PASS catalog.  

 
> Date: Fri, 23 May 2014 16:02:08 +0000
> From: [email protected]
> Subject: Friday Puzzler
> To: [email protected]
> 
> 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?
> 
> ________________________________
> Donald Grinsell
> State of Montana
> 406-444-2983
> [email protected]<mailto:[email protected]>
> "The difference between a conviction and a prejudice is that you can explain 
> a conviction without getting angry." ~ anonymous
> 
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
                                          
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

The information contained in this message is confidential, protected from 
disclosure and may be legally privileged.  If the reader of this message is not 
the intended recipient or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any disclosure, 
distribution, copying, or any action taken or action omitted in reliance on it, 
is strictly prohibited and may be unlawful.  If you have received this 
communication in error, please notify us immediately by replying to this 
message and destroy the material in its entirety, whether in electronic or hard 
copy format.  Thank you.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to