View previous topic :: View next topic
|
Author |
Message |
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
Thanks a lot all for your suggestions. I will also test them and try to publish the results here. |
|
Back to top |
|
|
|