In my jcl ,the 1st step is delete step, if the data set is existing, I want to delete, that one ,if dataset is no existing, I do not want abound the job, how can I code in display?

Showing Answers 1 - 2 of 2 Answers

Saradha

  • Oct 13th, 2005
 

Use IEFBR14 with DISP=(MOD,DELETE,DELETE). This is a dummy utility, just to make sure that atleast one EXEC statement is present in the JOB. DISP=(MOD,DELETE,DELETE) will delete the dataset, if it exists. If the dataset is not existing, then it will create and then delete it without abending the job.

  Was this answer useful?  Yes

seema nair

  • Apr 4th, 2006
 

Use IDCAMS DELETE utility in first step of JCL to delete all the files as shown below

//STEP0005 EXEC PGM=IDCAMS                
//SYSOUT   DD   SYSOUT=*                  
//SYSPRINT DD   SYSOUT=*                  
//SYSIN    DD   *                         
    DELETE ..DS1......(give dataset name here)

    DELETE ...DS2....

.

 .

   DELETE    DSn
        IF MAXCC = 8 THEN SET MAXCC = 0       
/*                                        

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions