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

VSAM files not Shared with "SHR" option


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

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Mon Nov 05, 2007 6:31 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 05, 2007 6:38 pm
Reply with quote

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
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Tue Nov 06, 2007 6:39 am
Reply with quote

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
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Tue Nov 06, 2007 7:54 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Nov 06, 2007 9:11 am
Reply with quote

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
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Tue Nov 06, 2007 9:31 am
Reply with quote

Both job names are difference......
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 06, 2007 1:14 pm
Reply with quote

Quote:
one of the job is being held.


What are the messages in the syslog ( the console ) ??
Back to top
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Tue Nov 06, 2007 1:30 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 06, 2007 1:42 pm
Reply with quote

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
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Tue Nov 06, 2007 2:13 pm
Reply with quote

Checked.....I'm 100% sure there is only one dataset(the same dataset) being shared and disposition is marked to "SHR"...
Back to top
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Tue Nov 06, 2007 4:05 pm
Reply with quote

Anyway, thanks for you guys opinion. icon_biggrin.gif
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Nov 06, 2007 4:07 pm
Reply with quote

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
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Wed Nov 07, 2007 8:53 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Nov 07, 2007 2:09 pm
Reply with quote

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
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Wed Nov 07, 2007 6:55 pm
Reply with quote

Thanks for your suggestion. I will try it out. And let you my finding. Thanks again. :D
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: Wed Nov 07, 2007 9:09 pm
Reply with quote

Hello,

Quote:
JOB07392 IEF861I FOLLOWING RESERVED DATA SET NAMES UNAVAILABLE TO JOBNAME
What dataset name is associated with this message?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Nov 07, 2007 11:31 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Nov 08, 2007 2:50 am
Reply with quote

Kinda feels like something is missing....maybe the earlier suggestion will point out where the conflict is.....
Back to top
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Thu Nov 08, 2007 7:08 am
Reply with quote

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
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Thu Nov 08, 2007 7:10 am
Reply with quote

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
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Thu Nov 08, 2007 7:35 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 08, 2007 12:24 pm
Reply with quote

Now the only thing left to do is to find out why the dataset is
under an exclusive enq...

good luck!
Back to top
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Tue Nov 20, 2007 8:44 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 20, 2007 12:59 pm
Reply with quote

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
View user's profile Send private message
FazerKing

New User


Joined: 25 Jan 2007
Posts: 18
Location: HK

PostPosted: Tue Nov 20, 2007 2:07 pm
Reply with quote

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
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts SCOPE PENDING option -check data DB2 2
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
Search our Forums:

Back to Top