MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

COBOL internal table or VSAM

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
astro
Beginner


Joined: 05 Oct 2005
Posts: 31
Topics: 7

PostPosted: Wed Dec 03, 2008 1:51 pm    Post subject: COBOL internal table or VSAM Reply with quote

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
View user's profile Send private message
jsharon1248
Intermediate


Joined: 08 Aug 2007
Posts: 291
Topics: 2
Location: Chicago

PostPosted: Wed Dec 03, 2008 2:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
astro
Beginner


Joined: 05 Oct 2005
Posts: 31
Topics: 7

PostPosted: Thu Dec 04, 2008 12:52 pm    Post subject: Reply with quote

Thanks Isharon for your valuable inputs
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group