View previous topic :: View next topic
|
Author |
Message |
Senthilkumar k Warnings : 1 New User
Joined: 07 May 2009 Posts: 51 Location: Chennai
|
|
|
|
HI,
i have two KSDS files like below,
file1,
aaaaaaaaaaaaaa
bbbbbbbbbbbbbb
cccccccccccccccc
file2,
eeeeeeeeeeeeee
aaaaaaaaaaaaaa
bbbbbbbbbbbbbb
i want to compare these two files and write the duplicate records alone in file1....means output like below,
file1,
aaaaaaaaaaaaaa
bbbbbbbbbbbbbb
can any one help me...................? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Near the top of this cobol part of the forum is a "Sticky" for a 2-file match/merge.
It is working code that with very minor modifications will do what you need.
Right-click on the attachment, save it to your pc, and upload it to your mainframe.
I'll not have an internet connect for the next few days, but will check back when i return. |
|
Back to top |
|
|
Senthilkumar k Warnings : 1 New User
Joined: 07 May 2009 Posts: 51 Location: Chennai
|
|
|
|
Thanks for your reply....i will check that one and get back to you. |
|
Back to top |
|
|
Senthilkumar k Warnings : 1 New User
Joined: 07 May 2009 Posts: 51 Location: Chennai
|
|
|
|
i have managed to write the program and it is working fine............thanks for your code. |
|
Back to top |
|
|
kunasatheesh
New User
Joined: 27 Sep 2007 Posts: 6 Location: Hyderabad India
|
|
|
|
Hi Senthil,
Can u please forward that code to me...
Thanks in advance.
edited to remove the email address |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Can u please forward that code to me.. |
repeat on
Near the top of this cobol part of the forum is a "Sticky" for a 2-file match/merge.
and do not post email addresses |
|
Back to top |
|
|
kunasatheesh
New User
Joined: 27 Sep 2007 Posts: 6 Location: Hyderabad India
|
|
|
|
I m new to COBOL...previously worked for PL1....I m not understanding ur logic...can u brief it... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I m not understanding ur logic |
What is not clear? If you are more specific about your doubt, someone will be able to clarify.
Suggest you "play computer" with the code and walk some data (make up 2 sets of keys that resemble your requirement) thru the code by hand.
Simply said, the code processes the data in both files syncronized on the key. For the code to work, both files must be in the key sequence. |
|
Back to top |
|
|
sudhakarreddy.ibm Warnings : 1 New User
Joined: 20 Apr 2009 Posts: 15 Location: chennai
|
|
|
|
Hi senthil,
I have a doubt regarding data in vsam file.Data is always sorted order in ksds file. I think, what the data you are mention in example is wrong.
Please correct me if i am wrong?
thanks
sudhakar |
|
Back to top |
|
|
|