View previous topic :: View next topic
|
Author |
Message |
maxsubrat
Active User
Joined: 27 Feb 2008 Posts: 110 Location: india
|
|
|
|
Hi,
I have 2 input flat files and 1 output file..
the file formats are like that:
file 1:
111 rama xxxx
222 shyam cccc
333 gopala vvvv
555 hari bbbb
file 2:
123 hasim rrrr
222 shyam cccc
456 ramesh kkkk
666 nilam iiii
555 hari bbbb
My output file should be like that:
output:
111 rama xxxx
222 shyam cccc
333 gopala vvvv
555 hari bbbb
123 hasim rrrr
456 ramesh kkkk
666 nilam iiii
Could someone tell me the logic i need to use it in the cobol program only..
Thanks |
|
Back to top |
|
|
maxsubrat
Active User
Joined: 27 Feb 2008 Posts: 110 Location: india
|
|
|
|
adding to the above: it is just like DB2 union type...
combining 2 files to the 3rd one without duplicate.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why does 123 not follow 111 in the output?
If you properly sort the 2 files by the "key" you can download the 2-file match/merge example code from the "Sticky" near the top of the cobol part of the forum.
The code there will do what you want with very minor modification. |
|
Back to top |
|
|
|