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
 

 

Regarding FILE ACCESS MODES

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Jun 08, 2010 1:19 am    Post subject: Regarding FILE ACCESS MODES
Reply with quote

I am not sure if this has been discussed already in this forum or not. I tried searching for a while but couldn't get the information that I exactly needed and hence posting it here.

I have a cobol program which reads a VSAM File randomly (key based). This VSAM is currently declared as RANDOM in the program. I remember reading somewhere that the DYNAMIC access is faster for RANDOM access. I tried testing the difference (CPU/Elapsed time) between the two, but I have not got any high volume production like files to do the test yet. In the mean time, thought of raising this query in here.

Any help to clarify the performance of various file access modes in COBOL would be really appreciated :-)
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Jun 08, 2010 2:25 am    Post subject:
Reply with quote

Access modes
Sequential-access
mode Allows reading and writing records of a file in a serial manner; the order of reference is implicitly determined by the position of a record in the file.
Random-access
mode Allows reading and writing records in a programmer-specified manner; the control of successive references to the file is expressed by specifically defined keys supplied by the user.
Dynamic-access
mode Allows the specific input-output statement to determine the access mode. Therefore, records can be processed sequentially or randomly or both.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Jun 08, 2010 2:38 am    Post subject: Reply to: Regarding FILE ACCESS MODES
Reply with quote

I've found that when you're performing RANDOM Read's only, that ACCESS IS RANDOM is the better way to go, together with adequate buffering.

Generally, ACCESS IS DYNAMIC is used when you're jumping all over the file, using START, READNEXT, READ, DELETE, etc....

Bill
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8120
Location: East Dubuque, Illinois, USA

PostPosted: Tue Jun 08, 2010 4:12 am    Post subject:
Reply with quote

If you're doing pure key-based reads of the file, ACCESS IS RANDOM should be slightly better than ACCESS IS DYNAMIC for performance. How much better? I don't know -- but it would probably take a couple million reads to add up to enough difference to notice. Just make sure you have plenty of index buffers and some data buffers assigned to the file!
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Tue Jun 08, 2010 6:59 pm    Post subject:
Reply with quote

Thanks a lot all for your suggestions. I will also test them and try to publish the results here.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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