Merging two files record by record.
-
- Registered Member
- Posts: 24
- Joined: Wed Jul 17, 2013 9:08 am
Merging two files record by record.
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.
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.
Re: Merging two files record by record.
Use joinkeys - examples abound. And you do NOT have files - you have DATA SETS.
Regards
Nic
Nic
-
- Global Moderator
- Posts: 588
- Joined: Wed Nov 20, 2013 11:53 am
- Location: Mars
Re: Merging two files record by record.
Alternatively you could also use WHEN=GROUP + Records=2
zprogrammer
-
- Registered Member
- Posts: 24
- Joined: Wed Jul 17, 2013 9:08 am
Re: Merging two files record by record.
Thanks Nic. I have found example of JOINKEYS for selecting duplicate records but could not find a similar example like mine. Will search again.
-
- Registered Member
- Posts: 24
- Joined: Wed Jul 17, 2013 9:08 am
Re: Merging two files record by record.
I couldnot follow your instruction, could you please guide again?
Re: Merging two files record by record.
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
Nic
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