View previous topic :: View next topic
|
Author |
Message |
abdulrafi
Active User
Joined: 14 Sep 2009 Posts: 184 Location: Coimbatore
|
|
|
|
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 |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Very very very basic question to be asked by an experienced programmer
Manual has all the information you need
what have you tried so far??
Do you try to test? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
abdulrafi
Active User
Joined: 14 Sep 2009 Posts: 184 Location: Coimbatore
|
|
|
|
My program only reads it... |
|
Back to top |
|
|
bodatrinadh
Active User
Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
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> |
|
Back to top |
|
|
bodatrinadh
Active User
Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
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
Thanks
-3nadh |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
Because, i practically faced the situation. |
very difficult to believe |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
|