Merging two files record by record.

IBM's Sort Product, ICETOOL, ICEMAN and ICEGENER.

Topic author
Sachin Kumar
Registered Member
Posts: 23
Joined: Wed Jul 17, 2013 9:08 am

Merging two files record by record.

Postby Sachin Kumar » Mon May 15, 2017 12:18 pm

Hi,

I want to merge the two records but the catch is that the records are from two different files. So it is like this:

File-1 is like - MY.FILE.ONE have the data "firstfiledata" and it's of length 80.
File-2 is like - MY.FILE.TWO have the data "secondfiledata" and it's of length 80.

I want my output file should be as: "firstfiledatasecondfiledata".

How can I do this, please help me on this.




nicc
Global Moderator
Global Moderator
Posts: 543
Joined: Wed Apr 23, 2014 8:45 pm
Been thanked: 11 times

Re: Merging two files record by record.

Postby nicc » Mon May 15, 2017 3:30 pm

Use joinkeys - examples abound. And you do NOT have files - you have DATA SETS.


Regards
Nic


zprogrammer
Global Moderator
Global Moderator
Posts: 603
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars
Has thanked: 7 times
Been thanked: 7 times

Re: Merging two files record by record.

Postby zprogrammer » Tue May 16, 2017 11:16 pm

Alternatively you could also use WHEN=GROUP + Records=2


zprogrammer


Topic author
Sachin Kumar
Registered Member
Posts: 23
Joined: Wed Jul 17, 2013 9:08 am

Re: Merging two files record by record.

Postby Sachin Kumar » Thu May 18, 2017 1:47 pm

nicc wrote:Source of the post Use joinkeys - examples abound. And you do NOT have files - you have DATA SETS.

Thanks Nic. I have found example of JOINKEYS for selecting duplicate records but could not find a similar example like mine. Will search again.




Topic author
Sachin Kumar
Registered Member
Posts: 23
Joined: Wed Jul 17, 2013 9:08 am

Re: Merging two files record by record.

Postby Sachin Kumar » Thu May 18, 2017 1:48 pm

zprogrammer wrote:Source of the post Alternatively you could also use WHEN=GROUP + Records=2

I couldnot follow your instruction, could you please guide again?




nicc
Global Moderator
Global Moderator
Posts: 543
Joined: Wed Apr 23, 2014 8:45 pm
Been thanked: 11 times

Re: Merging two files record by record.

Postby nicc » Thu May 18, 2017 4:20 pm

If you want something more specific then you need to give more details on your data - is there a 1-to- correlation between the records in data set 1 and the records in data set 2? If not - how are they to be matched? What are the key fields? Presumably your output data set is to be RECFM=FB and LRECL=160?


Regards
Nic


Return to “IBM DFSort, ICETOOL, ICEMAN, ICEGENER.”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests