MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

KSDS contention problem

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Mon Apr 18, 2011 11:28 am    Post subject: KSDS contention problem Reply with quote

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?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Apr 18, 2011 11:36 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Mon Apr 18, 2011 11:47 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Tue Apr 19, 2011 12:56 am    Post subject: Reply with 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.
Back to top
View user's profile Send private message Visit poster's website
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Tue Apr 19, 2011 5:33 am    Post subject: Reply with quote

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?
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Tue Apr 19, 2011 5:34 am    Post subject: Reply with quote

An after thought -- is your shop a JES2 shop?
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
lenovo
Beginner


Joined: 27 Nov 2008
Posts: 31
Topics: 9
Location: India

PostPosted: Tue Apr 19, 2011 4:06 pm    Post subject: Reply with quote

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!!!
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Tue Apr 19, 2011 4:49 pm    Post subject: Reply with quote

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                                                                 
Back to top
View user's profile Send private message
Anuj Dhawan
Intermediate


Joined: 19 Jul 2007
Posts: 298
Topics: 7
Location: Mumbai,India

PostPosted: Wed Apr 20, 2011 4:13 am    Post subject: Reply with quote

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.
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group