KSDS contention problem
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Data Management

#1: KSDS contention problem Author: lenovoLocation: India PostPosted: Mon Apr 18, 2011 11:28 am
    —
I am facing KSDS contention problem for a production dataset.The KSDS dataset is being updated by many jobs on a daily basis.

For eg: Job A and Job B are two jobs which updates the KSDS dataset. In normal scenarios, in which Job B starts execution after completion of Job A,then everything works fine.

But in case, the first job (Job A) takes more time to complete and the second job (Job B) is still waiting for the dataset then second job (Job B) abends with the message that the 'DATA SET IS ALLOCATED TO ANOTHER JOB OR USER'.

I also try using the VERIFY clause w.r.t. to the KSDS but nothing works out.

Is there any way that the contention problem can be resolved?

#2:  Author: kolusuLocation: San Jose PostPosted: Mon Apr 18, 2011 11:36 am
    —
lenovo,

Can't you make JOB B triggered by JOB A? or add a dependency on JOB B that it waits until JOB A completes. Your scheduler package should be able to handle this quite easily.

Kolusu

#3:  Author: lenovoLocation: India PostPosted: Mon Apr 18, 2011 11:47 am
    —
Hi Kolusu,
Appreciate your quick reply.
The job A (Appl A) and job B (Appl B) are ETT triggerred application, So I cannot add the dependency to it.

#4:  Author: warp5Location: Germany PostPosted: Tue Apr 19, 2011 12:56 am
    —
Have job a submit job b after it is completed with an iebcopy to internal rdr. I know that a tso job will wait for datasets, maybe you could experiment with that.

#5:  Author: Anuj DhawanLocation: Mumbai,India PostPosted: Tue Apr 19, 2011 5:33 am
    —
Quote:
I also try using the VERIFY clause w.r.t. to the KSDS but nothing works out.
Why do you do that?

VERIFY command causes a catalog to correctly reflect the end of a VSAM data set after an error occurs while closing a VSAM data set. The error might have caused the catalog to be incorrect - so why would it solve your problem?

What is share option are you uisng?

And why not take the simple way out and just include a DD statement pointing to the file being renamed with DISP=OLD?

#6:  Author: Anuj DhawanLocation: Mumbai,India PostPosted: Tue Apr 19, 2011 5:34 am
    —
An after thought -- is your shop a JES2 shop?

#7:  Author: lenovoLocation: India PostPosted: Tue Apr 19, 2011 4:06 pm
    —
Hi All,
@warp5:
Quote:

Have job a submit job b after it is completed with an iebcopy to internal rdr. I know that a tso job will wait for datasets, maybe you could experiment with that.
This would not be possible since the JobA and JobB (and so on like JobC, D...)are part of dynamic ETT applications (Appl A, B, C and so-on) and they are triggerred independent of each other.
@Anuj Dhawan:
KSDS is having Shareoptions = (3 3) and JES3 is being in our shop.

The Verify is coded in the below manner:

Code:
Step1) Verify step w.r.t. to the KSDS
Step2) Check the RC from Step1)
If RC>4 then
     a) Delay of 5
      b) Verify the KSDS again
      c) If RC of b)  >4 then abend
End if


One more question : Since the file is updated on daily basis, it normally contains large number of records.
Does the size make a difference? (I am asking this out of Curiosity)?

Thanks for all your help!!!

#8:  Author: taltymanLocation: Texas PostPosted: Tue Apr 19, 2011 4:49 pm
    —
You could write a step that would check for enqueue for your dataset and have it in a loop with a timer.

Run it in a batch TSO step. Here are the sample REXXs that you can modify and combine.

Code:

/*REXX*/                                                           
cbl_parm = '00000078'x /*wait in hex seconds */                   
address linkpgm "ilbowat0 cbl_parm"                               
say 'ilbowat0 return code = ' rc                                   
return                                                             


Code:

/* REXX */                                                             
/* check a dsname for any GRS enqueue */                               
TRACE E                                                               
PARSE UPPER ARG dsn                                                   
CONNAME = SPACE(CON TIME(S),0)                                         
"CONSOLE ACTIVATE NAME("CONNAME")"                                     
"CONSPROF UNSOLDISP(NO) SOLDISP(NO) SOLNUM(400)"                       
"CONSOLE SYSCMD(D GRS,RES=(SYSDSN,"dsn")) CART('CONS0001')"           
GETCODE = GETMSG('CONSMSG1.','SOL','CONS0001',,15)                     
IF GETCODE = 0 THEN do                                                 
  if CONSMSG1.0 > 3 then do                                           
    DO CNT = 3 TO CONSMSG1.0                                           
      SAY CONSMSG1.CNT                                                 
    END                                                               
  END                                                                 
END                                                                   
"CONSOLE DEACTIVATE"                                                   
RETURN                                                                 

#9:  Author: Anuj DhawanLocation: Mumbai,India PostPosted: Wed Apr 20, 2011 4:13 am
    —
Quote:
And why not take the simple way out and just include a DD statement pointing to the file being renamed with DISP=OLD?
How about this? What are you using DISP - looks like it's SHR.

And why not use SHR(2,3) -- I'm on the way and do not have access to the manuals, please check this too.



MVSFORUMS.com -> Data Management


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group