View previous topic :: View next topic
|
Author |
Message |
bibek24
New User
Joined: 14 Aug 2007 Posts: 35 Location: Hyderabad
|
|
|
|
I have two input file.Input-1 and Input-2
I need to match both the files based on a field say sec-no
Input-1 may have more that 1 records with the same sec-no whereas it is unique in input-2
If sec-no from the Input-1 matches with sec-no in the input-2, write to output with the information from input-1 and input-2
If not matches, record should be written but corresponding input-2 fields in the output should be spaces.
I copied the input-2 file into a VSAM KSDS, with dynamic access and Key as sec-no
I just need to know how the logic should be written for reading the VSAM file for each record of the input-1
I have a very little knowledge how a KSDS file is processed for a match against a sequential file
Could anyone please help me out? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Instead of using a vsam file, suggest you download the sample 2-file match/merge code that is attached to a "Sticky" near the top of the cobol part of the forum.
It is a waste of resources to create/load/read a vsam file just to match the "keys". |
|
Back to top |
|
|
bibek24
New User
Joined: 14 Aug 2007 Posts: 35 Location: Hyderabad
|
|
|
|
Where is the attachment? I didn't get it. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
|