Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
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    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

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

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: 13
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

Site Director


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

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: 13
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us