View previous topic :: View next topic
|
Author |
Message |
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
Hi, I'm a COBOL programmer. I recently face a problem about VSAM file sharing. I have two programs using the same dataset, one is for updating, the other is for read only. When I start both jobs at the same time. one of the job is being held.
I have read all possible materials before posting here. I tried everything I can but no luck. I have also tried "SHR" option in difference ways when defining the VSAM file.....the result is still the same. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Once the integrity issues have been solved using the appropriate
IDCAMS define parameters, there is ABSOLUTELY no reason for the
job being held....
unless the JCL' s involved were coded with "DISP=...OLD..."
( that' s the only reason for jobs to be put in a waiting for dataset status ) |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
Thanks for replying....but I have put "DISP=SHR" in both jobs. However, it does not work. Maybe I miss something that I dun know. |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
I made the defining as the following and I have use "DISP=SHR" in both JCL
DEF CL (NAME(Dataset name) -
CYL(10 5) -
VOL(VOLname) -
INDEXED -
SHAREOPTIONS(3 3)) -
DATA(NAME(Dataset name.DATA) -
CISZ(4096) -
KEYS(64 0) -
SHAREOPTIONS(3 3) -
RECSZ(95 95)) -
IX (NAME(Dataset name.INDEX) -
CISZ(1024) -
SHAREOPTIONS(3 3)) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Do your 2 jobs have the same jobname?
If they do, you will need to change the name of one of them. The system will not allow 2 jobs with the same name to run at the same time. |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
Both job names are difference...... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
one of the job is being held. |
What are the messages in the syslog ( the console ) ?? |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
The following is the message from the job being held.
"JOB07392 IEF861I FOLLOWING RESERVED DATA SET NAMES UNAVAILABLE TO JOBNAME
JOB07392 IEF863I DSN = Datasetname JOBNAME RC = 04
JOB07392 *IEF099I JOB JOBNAME WAITING FOR DATA SETS "
The other job is still running fine. Obviously, I might have forgotten to define something.....now, I have been studying something like ENQ stuffs....hope it could help.... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
The message sequence is clear...
somewhere in Your jcl there is a disp which asks for exclusive use of some dataset...
check again the dataset names and the relative disposition!
dumb hint, maybe it' s another dataset involved |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
Checked.....I'm 100% sure there is only one dataset(the same dataset) being shared and disposition is marked to "SHR"... |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
Anyway, thanks for you guys opinion. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
FazerKing,
Quote: |
thanks for you guys opinion |
Does this mean, your issued is resolved?
May be its not a bad idea sharing your solution with the forum. |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
No, I'm still seeking the solution on the query. As I memtioned before, I tried everything I know before posting to the forum...kind of fustrated.
This is not the first time I face this problem. But I was used to take the other approach to solve the problem. This time is a bit difference, so that's why I ask for help. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Does Your first jobrun long enough to ...
from Your tso session enter the command
"ISRDDN" or "TSO ISRDDN" if the first one fails,
enter "ENQ"
enter the job name
You will get a list of the resources enqued upon by the job
the resources in red will be held in exclusive control
if Your dataset is in red investigate the program why a shared enq becomes
an exclusive one |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
Thanks for your suggestion. I will try it out. And let you my finding. Thanks again. :D |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
JOB07392 IEF861I FOLLOWING RESERVED DATA SET NAMES UNAVAILABLE TO JOBNAME |
What dataset name is associated with this message? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Do you use the same dataset in a later step of the job ? and if so has the disposition been changed there too ? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Kinda feels like something is missing....maybe the earlier suggestion will point out where the conflict is..... |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
dick scherrer wrote: |
Hello,
Quote: |
JOB07392 IEF861I FOLLOWING RESERVED DATA SET NAMES UNAVAILABLE TO JOBNAME |
What dataset name is associated with this message? |
Due to the security reason, I am not allowed to provide the information you asked. But I am sure that the dataset names in both jobs are exactly the same. |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
expat wrote: |
Do you use the same dataset in a later step of the job ? and if so has the disposition been changed there too ? |
Both datasets are using "DISP=SHR". |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
enrico-sorichetti wrote: |
Does Your first jobrun long enough to ...
from Your tso session enter the command
"ISRDDN" or "TSO ISRDDN" if the first one fails,
enter "ENQ"
enter the job name
You will get a list of the resources enqued upon by the job
the resources in red will be held in exclusive control
if Your dataset is in red investigate the program why a shared enq becomes
an exclusive one |
Hi there, I have tried what you suggested and found that both datasets are on the list and one of the dataset is highlighted (in exclusive mode).
The first job has enough time to go. Actually, it is a whole day job which will keep running until 2:00am and it will be refresh itself and run again and again.....until the next refresh time. Anyway, will keep you guys updated if I find anything new. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Now the only thing left to do is to find out why the dataset is
under an exclusive enq...
good luck! |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
Just found the reason. For file sharing, it seems like it's only allowed while online function, but not for batch run. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
ust found the reason. For file sharing, it seems like it's only allowed while online function, but not for batch run. |
the reason is WRONG but if You are satisfied with it it' s ok for me.. |
|
Back to top |
|
|
FazerKing
New User
Joined: 25 Jan 2007 Posts: 18 Location: HK
|
|
|
|
The reason came up from someone who is one of the senior of the ex company. of course, I'm not satisfied with it. But I can't flight back with a better answer. Did you try to simulate the same situation to run a batch job like this? |
|
Back to top |
|
|
|