IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

populate input records to a dynamic array


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
soumyanamboo

New User


Joined: 16 Apr 2008
Posts: 13
Location: Chennai

PostPosted: Wed Jul 23, 2008 12:52 pm
Reply with quote

hi,
i have a requirement like,
There are 3 i/p files. for each record in the 2 i/p file, i have to read the third file and populate requird fields.
in this case i need to read the 3rd file twice, one read for each file.
How can i optimise the read to 3rd file, since it is master database file.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 23, 2008 12:53 pm
Reply with quote

Is it keyed ?
Back to top
View user's profile Send private message
soumyanamboo

New User


Joined: 16 Apr 2008
Posts: 13
Location: Chennai

PostPosted: Wed Jul 23, 2008 1:08 pm
Reply with quote

ya. we have key field for comparison
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jul 23, 2008 7:50 pm
Reply with quote

Hello,

Your definition of your requirement is not clear.

You mention 3 input files, but then say file 3 is "master database file". If "file 3" is a database, you could read file1 and retrieve the needed data from the database. After completing file1, read file2 and retrieve the needed data from the database.

If both file1 and file2 are sorted n the same sequence, you could use a 2-file match/merge and as records are processed get the needed data from the database. This would save some amount of access to the database.

If file3 is not a database, please provide a better description of what you need to do. If you post example data from all 3 data sources and what you want the output to be it will help us help you.

Where does the dynamic array get used?
Back to top
View user's profile Send private message
soumyanamboo

New User


Joined: 16 Apr 2008
Posts: 13
Location: Chennai

PostPosted: Thu Jul 24, 2008 9:26 am
Reply with quote

I thought of reading the two files and populate to a dynamic array, and read the Database file for each rec in the array.
But instead, i will merge the two files, and sort it based on the key, and read the database file.
That will be sufficient.

Thanks...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 4
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
Search our Forums:

Back to Top