How to avoid contention with delete idcams



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to avoid contention with delete idcams

Postby samb01 » Fri Oct 25, 2013 1:46 pm

Heelo,

i have contention between two jobs on one file :

Job01 is trying to dump it by adrdssu with the option :

DUMP OUTDDNAME(OUTDD1)                    -                   
     DATASET(INCL(                        -                   
                  AAA.*.**)               -                   
             EXCL(                        -                   
                  AAA.BBB.**, -
                  AAA.V*.*.A*.BBB       -                   
                                      )) -                   
CANCELERROR TOL(ENQF) OPTIMIZE(4) FORCECP(0) WAIT(1,2) SHARE 
IF MAXCC =4 THEN SET MAXCC=0;                                 




Job02 is trying to delete it by idcams

//DELETE EXEC PGM=IDCAMS                   
//SYSPRINT DD SYSOUT=*                     
//SYSIN  DD *                             
DELETE AAA.YYY.ZZZ   



And the Job02 is abended with RC=08.

I would like to know if ist's possible to prevent the abned of the job02 (avoid the RC=08...). The message is

   DELETE AAA.YYY.ZZZ                                07050
0IKJ56225I DATA SET AAA.YYY.ZZZ ALREADY IN USE, TRY       
 IKJ56225I LATER                                                             
 IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER                       
 IDC0551I ** ENTRY AAA.YYY.ZZZ NOT DELETED               
0IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8                   
0                                                                             



Thank's for your help.
samb01
 
Posts: 427
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: How to avoid contention with delete idcams

Postby Robert Sample » Fri Oct 25, 2013 3:07 pm

//DELETE EXEC PGM=IDCAMS                   
//DD01     DD DISP=OLD,DSN=AAA.YYY.ZZZ
//SYSPRINT DD SYSOUT=*                     
//SYSIN  DD *                             
DELETE AAA.YYY.ZZZ   
will not allow this job to run until the data set is available.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: How to avoid contention with delete idcams

Postby Stefan » Fri Oct 25, 2013 3:10 pm

If you really want the second job to continue although the dataset cannot be deleted than improve the IDCAMS step by overwriting the "bad" return code like this:

//DELETE EXEC PGM=IDCAMS                   
//SYSPRINT DD SYSOUT=*                     
//SYSIN  DD *                             
DELETE AAA.YYY.ZZZ
IF MAXCC EQ 8 THEN SET MAXCC = 0
/*
There are 10 types of people in the world: Those who understand binary, and those who don't.
User avatar
Stefan
 
Posts: 27
Joined: Tue Aug 21, 2012 3:02 pm
Has thanked: 0 time
Been thanked: 2 times

Re: How to avoid contention with delete idcams

Postby samb01 » Fri Oct 25, 2013 4:54 pm

Yes but the file will not be deleted...
samb01
 
Posts: 427
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: How to avoid contention with delete idcams

Postby BillyBoyo » Fri Oct 25, 2013 5:45 pm

If you are doing a BACKUP at some point and a DELETE at some point, then there is a logical order to things.

For this type of logical ordering, you use your Scheduler package.

If you have a timing problem, in that you can't wait to have the entire backup complete before your delete runs, then split the backup.

The short answer is, make the DELETE job dependent on the BACKUP job. With whatever arrangements you need to have that meet your timing requirements.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post