Merging two files record by record.

IBM's Sort Product, ICETOOL, ICEMAN and ICEGENER.
Post Reply
Sachin Kumar
Registered Member
Posts: 24
Joined: Wed Jul 17, 2013 9:08 am

Merging two files record by record.

Post by Sachin Kumar »

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: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Merging two files record by record.

Post by nicc »

Use joinkeys - examples abound. And you do NOT have files - you have DATA SETS.
Regards
Nic
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Merging two files record by record.

Post by zprogrammer »

Alternatively you could also use WHEN=GROUP + Records=2
zprogrammer
Sachin Kumar
Registered Member
Posts: 24
Joined: Wed Jul 17, 2013 9:08 am

Re: Merging two files record by record.

Post by Sachin Kumar »

nicc wrote: 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.
Sachin Kumar
Registered Member
Posts: 24
Joined: Wed Jul 17, 2013 9:08 am

Re: Merging two files record by record.

Post by Sachin Kumar »

zprogrammer wrote: 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: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Merging two files record by record.

Post by nicc »

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
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

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