To sort an output file having duplicates using sort.

2 posts / 0 new
Last post
kimir
Offline
Joined: 10/20/2011 - 16:53
To sort an output file having duplicates using sort.

 

Hi all, I have one input file with repeated data except two fields that together make the rows unique.eg: 
 
 
 
AAAAAA BBBBBB CCCCC D 01236555 FFFFFFF
AAAAAA BBBBBB CCCCC E 21548799 FFFFFFF
AAAAAA BBBBBB CCCCC X FFFFFFF
MMMMMM NNNNNN OOOOO I 98765444 GGGGGGG
MMMMMM NNNNNN OOOOO J 47125896 GGGGGGG
MMMMMM NNNNNN OOOOO H 11225544 GGGGGGG
SSSSSS PPPPPP RRRRR T 74555555 UUUUUUU
SSSSSS PPPPPP RRRRR V 85475222 UUUUUUU
 
 
 
Now, I have to make the final output file to look like the below. 
"; ; ; ;
 
 
 
 
 
 
AAAAAA BBBBBB CCCCC 01236555 21548799          FFFFFFF
MMMMMM NNNNNN OOOOO 98765444 47125896 11225544 GGGGGGG
SSSSSS PPPPPP RRRRR 74555555 85475222       UUUUUUU
 
Can this be achieved through sort. If yes please guide me on how it can be coded. Hoping for a quick response.
 
Thank You, Kimir
Anonymous (not verified)
Go for COBOL or easytrive

I woud suggest you to make use of cobol or easytrieve to achieve it, doing it with sort would be
little difficult.

Log in or register to post comments
Sponsored Listing

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer

Navigation