View previous topic :: View next topic |
Author |
Message |
astro Beginner
Joined: 05 Oct 2005 Posts: 31 Topics: 7
|
Posted: Wed Dec 03, 2008 1:51 pm Post subject: COBOL internal table or VSAM |
|
|
Friends,
Please advise which one will be efficient in terms of CPU/Elapsed time consumption & why?
I need to search a Cobol internal table with 60 occurrences for each input record with a Binary Search. Currently there are 1 million records in the input file. In this case Will it not be more efficient if I go for VSAM file & search the VSAM file only once for every input record?
Please advise.
Thanks
Astro |
|
Back to top |
|
 |
jsharon1248 Intermediate
Joined: 08 Aug 2007 Posts: 291 Topics: 2 Location: Chicago
|
Posted: Wed Dec 03, 2008 2:13 pm Post subject: |
|
|
You'd have to capture the statistics yourself to determine which is going to be more efficient. I think both options will yield similar results. If I'm understanding your explanation, you only have 60 elements in the table, which would equate to 60 records in the VSAM file. Unless you have monster sized record lengths, all the records would fit comfortably in 1 CI with CISIZE=4096. After the first physical read, the data and index CI's will be buffered and there'd be no more physical I/O. For both options you should consider developing your solution to bypass the lookup when the current lookup argument is the same as the previous; the results would still be in Working Storage. |
|
Back to top |
|
 |
astro Beginner
Joined: 05 Oct 2005 Posts: 31 Topics: 7
|
Posted: Thu Dec 04, 2008 12:52 pm Post subject: |
|
|
Thanks Isharon for your valuable inputs |
|
Back to top |
|
 |
|
|