View previous topic :: View next topic
|
Author |
Message |
kirtika
New User
Joined: 06 Nov 2009 Posts: 3 Location: Bangalore
|
|
|
|
Hi,
I am new to PL/1 hence i am not sure of the approach to be followed
The query is we have 2 files in which
1. The master file that grows by 5K records every day
2. The second file which has 500 K records.
There is a 10 byte number field which is present in both input and master file.
We need to match the corresponding 8 digit field for the 10 digit field from master file and write it to the output file.
We need to design a new PL/1 program to do the matching.
Also the OSB system which we use does not support VSAM processing.
Hence request you to let me know what will be the efficient logic to achieve the same in PL/1 |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
where are You facing issues?, the logic or the coding
Quote: |
8 digit field for the 10 digit |
usually the matching is done agains homogeneous <things>,
please clarify |
|
Back to top |
|
|
kirtika
New User
Joined: 06 Nov 2009 Posts: 3 Location: Bangalore
|
|
|
|
Hi enrico
I need to know the logic to proceed |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
from Your profile I see that You list cobol as a skill!
There is a "sticky" in the "Mainframe COBOL" part of the Forum (2-File Match/Merge sample code) -- unload(download?) have a look there to find the logic! If you get stuck, please post us back with what you cannot understand |
|
Back to top |
|
|
kirtika
New User
Joined: 06 Nov 2009 Posts: 3 Location: Bangalore
|
|
|
|
Hi Enrico,
Just now had a look.Thanks for the quick reply .
My doubt is ,its like we will have to loop through the entire master file to find the matching record.Is there a better and mor effecient way to use it
If you can provide any sample code for PL/1 for that ,it would be great
Thanks in Advance |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
its like we will have to loop through the entire master file to find the matching record. |
Both files need to be in sequence before being read by your code.
Your code should read each record in both files only once (hence the term match/merge) and process depending on the records read. You will not loop thru either file multiple times.
Quote: |
Is there a better and mor effecient way to use it |
This is the more efficient way. |
|
Back to top |
|
|
|