Scott Ford wrote:

>Since I started this "question", so how is "one" to check for the existence of 
>datasets if we can't really trust IEFBR14 ? Yeah, I can write an Assembler 
>routine, by why, when BR14 is supposed to work...I have staging datasets we 
>use to build our product, my first step is the IEFBR14 , to delete these 
>datasets if they exist, if not fine give me a return code I can test for and 
>proceed on with the other steps.

IEFBR14 is good for such 'staging' of datasets. There are many threads (and 
replies in this thread) about usage of MOD for datasets which exist or not.

You could use IDCAMS and friends to do such things if you don't mind overhead.

Or for RC usage/testing, you could use this in IKJEFT01 to determine what to do 
for exist or not of datasets:

 LISTDS PEST.JCL                       
   IF &SYSDSN('PEST.JCL') = OK THEN   +
    DO                                    
     WRITE PESKY DATASET FOUND                  
     SET &RC = 0                          
    END                                   
   ELSE  +                                
    DO                                    
     WRITE PESKY DATA SET NOT FOUND             
     SET &RC = 4                          
    END                                   

Have fun. ;-)

Groete / Greetings
Elardus Engelbrecht

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

Reply via email to