IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Resolving Contention error


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Sat Jan 26, 2008 7:15 am
Reply with quote

Generally when a job1 needs a dataset which is used by job2, it waits for that dataset to free. But I have a case when a dataset used by a particular job say JOBA is used by several other jobs which may or may not execute at the same time the JOBA runs. In my case the job abends with the error mesage as DATA SET IS ALLOCATED TO ANOTHER JOB OR USER. I need to make the job wait until the dataset is free. Please help me out in this case.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Sat Jan 26, 2008 8:08 am
Reply with quote

Make sure you are using a DISP of OLD in JOBA.

You could also try adding a step to your JCL before the contention problem step that reads the dataset in with a DISP=OLD.

Code:

//STEPX EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=OLD,DSN=DATASET.HAVING.CONTENTN
//SYSUT2 DD DUMMY
//SYSIN DD DUMMY


Hopefully this example would cause your job to wait until the dataset was available. If the problem dataset is VSAM, you may have to use a utility like FILEAID to READ the file with a DISP of OLD.
Back to top
View user's profile Send private message
rajaherein

New User


Joined: 11 Jan 2007
Posts: 23
Location: chennai

PostPosted: Mon Jan 28, 2008 4:46 pm
Reply with quote

Dataset contention problem represents poor design. The OLD disposition

is assigned only when there is an update or critical need.

Say PGMA is given OLD disposition, what happens to other jobs, other jobs

will also fail due to dataset contention.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jan 28, 2008 9:03 pm
Reply with quote

Hello,

Quote:
Dataset contention problem represents poor design.
Not 100% of the time.

Quote:
Say PGMA is given OLD disposition, what happens to other jobs, other jobs will also fail due to dataset contention.
Typically the "other" jobs that need the already allocated resource will "wait" rather than being abended.

Usually this can be minimized by running jobs via proper scheduling.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Getting Error while trying to establi... DB2 3
Search our Forums:

Back to Top