Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
populate input records to a dynamic array

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
soumyanamboo

New User


Joined: 16 Apr 2008
Posts: 8
Location: Chennai

PostPosted: Wed Jul 23, 2008 12:52 pm    Post subject: populate input records to a dynamic array
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
References
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 3509
Location: Brussels once more ...

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

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

New User


Joined: 16 Apr 2008
Posts: 8
Location: Chennai

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

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

Global Moderator


Joined: 23 Nov 2006
Posts: 8639
Location: 221 B Baker St

PostPosted: Wed Jul 23, 2008 7:50 pm    Post subject:
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: 8
Location: Chennai

PostPosted: Thu Jul 24, 2008 9:26 am    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1