View previous topic :: View next topic
|
Author |
Message |
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
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 |
|
|
cpuhawg
Active User
Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
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 |
|
|
rajaherein
New User
Joined: 11 Jan 2007 Posts: 23 Location: chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|