Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Resolving Contention error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Resolving Contention error
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    Post subject: Reply to: Resolving Contention error
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    Post subject: Reply to: Resolving Contention error
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

Site Director


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

PostPosted: Mon Jan 28, 2008 9:03 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us