Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Doubt in usage of a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 135
Location: Coimbatore

PostPosted: Tue Jan 22, 2013 7:33 pm    Post subject: Doubt in usage of a file
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

Moderator


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

PostPosted: Tue Jan 22, 2013 7:42 pm    Post subject:
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: 7913
Location: Bellevue, IA

PostPosted: Tue Jan 22, 2013 8:12 pm    Post subject:
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: 135
Location: Coimbatore

PostPosted: Thu Jan 24, 2013 11:57 am    Post subject:
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    Post subject: Reply to: Doubt in usage of a file
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Jan 24, 2013 1:23 pm    Post subject: Reply to: Doubt in usage of a file
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    Post subject: Reply to: Doubt in usage of a file
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: 7913
Location: Bellevue, IA

PostPosted: Thu Jan 24, 2013 3:52 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Jan 25, 2013 1:52 am    Post subject: Reply to: Doubt in usage of a file
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

Site Director


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

PostPosted: Fri Jan 25, 2013 2:57 am    Post subject:
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: 1445
Location: Azeroth

PostPosted: Fri Jan 25, 2013 12:25 pm    Post subject:
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

Site Director


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

PostPosted: Fri Jan 25, 2013 10:28 pm    Post subject:
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    Post subject:
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: 1715
Location: UK

PostPosted: Sat Jan 26, 2013 5:32 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us