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

Doubt in usage of a file


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

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Tue Jan 22, 2013 7:33 pm
Reply with quote

Hi,

I have a PS file which I have defined it as:
DSN=file-name, DISP=SHR

I am going to run 4 program parallely which uses this one file.

Will there be any contention error happening because of using the same file for all 4 pgms and that too running all of them in parallel ?.

Please assist.

Thanks
Abdul Rafi.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Jan 22, 2013 7:42 pm
Reply with quote

Very very very basic question to be asked by an experienced programmer icon_eek.gif

Manual has all the information you need

what have you tried so far??

Do you try to test?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Jan 22, 2013 8:12 pm
Reply with quote

Quote:
Will there be any contention error happening because of using the same file for all 4 pgms and that too running all of them in parallel ?.
I notice you did not bother to tell us if your programs are reading or writing the file -- contention depends upon how many programs need to write to the file, usually.
Back to top
View user's profile Send private message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Thu Jan 24, 2013 11:57 am
Reply with quote

My program only reads it...
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Thu Jan 24, 2013 12:37 pm
Reply with quote

Hi abdulrafi,

Quote:

My program only reads it...


If it is a Test file(s), then there won't be any contention.
If it is a PROD/UACC then there may be a chance of contention.

Thanks
-3nadh
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Thu Jan 24, 2013 1:23 pm
Reply with quote

Quote:
If it is a Test file(s), then there won't be any contention.
If it is a PROD/UACC then there may be a chance of contention.


just explain why You believe so

did You post just to increment the post count ??

with ...
DISP=OLD there will be the same level of JOB SCHEDULING contention regardless of the environment
DISP=SHR there will be no contention

once upon a time
with <less advanced/dumb> channel device architectures
without caching, without advanced buffering techniques
there could have been some device contention at the hardware level if different tasks were reading at different positions in the file,
( seek contention, read head moving back and forth )

and anyway the same level of DEVICE contention incurred by accessing different datasets on the same device

but meditate...
nowadays with OPAQUE dasd arrays there is a doubt that
a dataset will reside in the same low level physical disk
and also the device contention is a moot point
the system might think that the I/O is spread across <many> as seen by zOS devices
when really at low level everything is on the same <drive> icon_cool.gif
Back to top
View user's profile Send private message
bodatrinadh

Active User


Joined: 05 Jan 2007
Posts: 101
Location: chennai (India)

PostPosted: Thu Jan 24, 2013 1:38 pm
Reply with quote

Hi Enrico,

Quote:

just explain why You believe so


Because, i practically faced the situation.


Quote:

did You post just to increment the post count ??


If this is the case, then i would have replied to each and every post icon_biggrin.gif


Thanks
-3nadh
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Thu Jan 24, 2013 3:52 pm
Reply with quote

Quote:
If it is a Test file(s), then there won't be any contention.
If it is a PROD/UACC then there may be a chance of contention.
This may be true at YOUR site -- it is NOT true in general. For sequential disk files being read in batch, in general, using DISP=SHR will not cause any contention ever -- period. For sequential files on tape, well the tape can only be at one spot at one time so tape reads are only done sequentially. For VSAM files in CICS, though, there may be issues with the string count -- but the original post is not about VSAM nor about CICS.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Fri Jan 25, 2013 1:52 am
Reply with quote

Quote:
Because, i practically faced the situation.

very difficult to believe
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jan 25, 2013 2:57 am
Reply with quote

Hello,

Quote:
I am going to run 4 program parallely which uses this one file. Will there be any contention error happening because of using the same file for all 4 pgms

A bit of clarification . . .

If you run 4 processes concurrently, there will be contention. It may or not be obvious/visable. I would not expect any "contention error".

If you create a test dasd file of a 100million 500 byte records and run a process to read the file, it will take some amount of time. If you run 4 of these read processes concurrently, how long do these take compared to the single run?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Fri Jan 25, 2013 12:25 pm
Reply with quote

Hi,

This might sound like a lot of BULL but
Long back, I have faced an issue in a dataset being used in exclusive hold eventhough DISP=SHR is mentioned on the dataset.

When using PGM=SASSBSTR to issue CA7 commands in batch the a dataset was allocated as shown below.
Code:
//UCC7CMDS DD  DSN=SOME.CA7.MANAGED.FLAT.PS.FILE,DISP=SHR


But my program failed with
Code:

INSUFFICIENT ACCESS AUTHORITY
ACCESS INTENT(UPDATE )  ACCESS ALLOWED(READ   )

I think im missing something that it obvious :S
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jan 25, 2013 10:28 pm
Reply with quote

Hello,

Many "system software" modules do things "under the covers" that are not obvious looking at the jcl.

You may be missing something, but i suspect it is not obvious.

What does the CA7 doc have to say about this DD?
Back to top
View user's profile Send private message
Gary McDowell

Active User


Joined: 15 Oct 2012
Posts: 139
Location: USA

PostPosted: Fri Jan 25, 2013 11:30 pm
Reply with quote

Quote:
I think im missing something that it obvious


My guess is even though you have DISP=SHR for read-only your program was trying to do an Update.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Sat Jan 26, 2013 5:32 am
Reply with quote

Without the message identifier it is difficult to know if that is a security message or not - looks like one. If it is then it has nothing at all to do with the dataset disposition.
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 Unable to interpret a hex value to De... COBOL Programming 4
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
Search our Forums:

Back to Top