Tom,

Thanks for the suggestion.  I gave it a try and added VOL=REF=*.STEP1.DD1 to 
the STEP3 DD.  My job got a JCL error with the following additional message:

IGD17054I DATA SET NOT FOUND FOR DELETE/RENAME ON VOLUME TS741D  997       
DATA SET IS F00.DUMMY                                                      
IGD17054I DATA SET NOT FOUND FOR DELETE/RENAME ON VOLUME TS741D  998       
DATA SET IS F00.DUMMY                                                      
IEF378I xxxxxxF STEP3 - JOB FAILED - TIME=13.11.15  999                    
        CATALOG DISPOSITION ERROR                                          

Step 2 indicates that the dataset was deleted:

IEF236I ALLOC. FOR CZ0055F STEP2                                                
         
IEF237I JES2 ALLOCATED TO DD1                                                   
         
IGD103I SMS ALLOCATED TO DDNAME                                                 
         
IEF142I xxxxxxF STEP2 - STEP WAS EXECUTED - COND CODE 0000                      
         
IEF285I   xxxxxx.xxxxxxF.JOB94242.D0000101.?           SYSIN                    
         
IGD105I F00.DUMMY                                    DELETED,   DDNAME=     

Step 3 is a little more descriptive:  

IEF236I ALLOC. FOR xxxxxxF STEP3                                       
IGD103I SMS ALLOCATED TO DDNAME DD1                                    
IEF142I xxxxxxF STEP3 - STEP WAS EXECUTED - COND CODE 0000             
IGD17054I DATA SET NOT FOUND FOR DELETE/RENAME ON VOLUME TS741D        
DATA SET IS F00.DUMMY        

But then I get this after the step termination blocks for STEP3:

IEF373I STEP/STEP3   /START 2014143.1311                                        
IEF032I STEP/STEP3   /STOP  2014143.1311                                        
        CPU:     0 HR  00 MIN  00.00 SEC    SRB:     0 HR  00 MIN  00.00 SEC    
        VIRT:     8K  SYS:   228K  EXT:        8K  SYS:    11372K               
IEF379I xxxxxxF STEP3 - JOB ENDED BECAUSE OF CATALOG ERROR                      
                                          


I then added the VOL=REF to the DD statement in STEP2.  The job completed 
normally, but still produced the IGD17054I messages.

STEP2 produced the following:

IEF236I ALLOC. FOR xxxxxxF STEP2                                              
IEF237I JES2 ALLOCATED TO DD1                                                 
IGD103I SMS ALLOCATED TO DDNAME                                               
IEF142I xxxxxxF STEP2 - STEP WAS EXECUTED - COND CODE 0000                    
IEF285I   xxxxxx.xxxxxxF.JOB94251.D0000101.?           SYSIN                  
IGD104I F00.DUMMY                                    RETAINED,  DDNAME=       

Step3:

IEF236I ALLOC. FOR xxxxxxF STEP3                                                
IGD103I SMS ALLOCATED TO DDNAME DD1                                             
IEF142I xxxxxxF STEP3 - STEP WAS EXECUTED - COND CODE 0000                      
IGD105I F00.DUMMY                                    DELETED,   DDNAME=DD1      
   

Post Step3:

IGD103I SMS ALLOCATED TO DDNAME SYS00001                                        
    
IGD104I SYS14143.T131544.RA000.xxxxxxF.R0148444      RETAINED,  DDNAME=SYS00001 
    
IGD17054I DATA SET NOT FOUND FOR DELETE/RENAME ON VOLUME 9393A3                 
    
DATA SET IS F00.DUMMY                                                           
    

Curiouser and Curiouser, as the saying goes.

Have a great weekend everybody!

--
 
Donald Grinsell
State of Montana
406-444-2983
[email protected]

"To understand something does not mean approval of it."
~ Commander Spock

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Tom Marchant
Sent: Friday, May 23, 2014 12:03 PM
To: [email protected]
Subject: Re: Friday Puzzler

On Fri, 23 May 2014 16:02:08 +0000, Grinsell, Don wrote:

>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

The data set is not deleted. It is removed from the passed data queue. 
(Is that still what it is called?)

>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?

When a PASSed data set is referenced in a subsequent step, it is removed from 
the passed data queue. If you had another DD in STEP2 that referenced the same 
data set, that allocation would fail also.

Another way to fix the problem would be to add
VOL=REF=*.STEP1.DD1 to the DD in STEP3, proving that the data set was not 
deleted at the end of STEP2.

In fact, you could also resolve the problem by putting the
VOL=REF=*.STEP1.DD1 on the DD in STEP2. In that case, the passed data queue is 
not used, leaving the entry there to be used in step 3.

The reference to the default of DELETE for a new data set does not apply here. 
That default is for the step, not the job. The default for the data set in 
STEP2 is KEEP, because it was OLD in STEP2.

--
Tom Marchant

----------------------------------------------------------------------
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

Reply via email to