Combining 4 files in sort



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Combining 4 files in sort

Postby shankar13288 » Wed Apr 06, 2016 11:24 pm

Hi,

I have four input files and have to combine all the four files. below is the sample. Please let me know if its possible through sort.

Input:
File 1
111 aaa
222 bbb

File 2
111 ccc
222 ddd
333 eee

File 3
111 aaa
333 fff
444 ggg

File 4
111 hhh
555 iii


Output:
111 aaa ccc aaa hhh
222 bbb ddd        
333       eee fff
444             ggg
555                    iii
shankar13288
 
Posts: 1
Joined: Tue Apr 10, 2012 9:23 am
Has thanked: 0 time
Been thanked: 0 time

Re: Combining 4 files in sort

Postby Aki88 » Thu Apr 07, 2016 2:51 pm

Hello,

This is a repeated query and there are many examples available for it on the forum/web; I did a quick Google search for 'Combining multiple records in DFSORT' which is what you're primarily trying to achieve; the first few results returned by the search give detailed explanation of what you want.

Look at the said examples and the Smart DFSORT Tricks manual; try coding the SORT card; if it doesn't give you the expected result show us what you've tried and someone might be able to guide you.
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: Combining 4 files in sort

Postby NicC » Thu Apr 07, 2016 2:54 pm

Please use the code tags to present your data, code, screen shots or anything else requiring a fixed pitch font. As you keyed your post ypu output looks like this:
111 aaa ccc aaa hhh
222 bbb ddd
333 eee fff
444 ggg
555 iii

instead of like this:
111 aaa ccc aaa hhh
222 bbb ddd        
333       eee fff
444             ggg
555                    iii


RECFM of each input dataset (they are not files), LRECL, key position and length. LRECL and RECFM of the output dataset. Will there ever be duplicate keys on the input datasets - if so, how are they dealt with?

Also, do your homework first on any forum - the search facility is there to be used, not just take up screen real-estate. Also, as pointed out by Aki88 - use google.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post