Skip to Content
Custom Search

To sort an output file having duplicates using sort.

1 reply [Last post]
kimir
Offline
Joined: 10/20/2011
Posts:

 

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
Sponsored Listing
Anonymous
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.

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

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 1 user and 29 guests online.

Online users

  • abhilasha
Dr. Radut | forum