View previous topic :: View next topic
|
Author |
Message |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi,
My input file(record length-37) is
Code: |
00256011613206aaaaaaaaaaaaaaa00111111
00256011613206bbbbbbbbbbbbbbb00111111
00256011613206ccccccccccccccc00111111
00256011613206ddddddddddddddd00111111
00256011613206eeeeeeeeeeeeeee00111111
00256011613203aaaaaaaaaaaaaaa00222222
00256011613203bbbbbbbbbbbbbbb00222222
00256011613203ccccccccccccccc00222222
00256011613203ddddddddddddddd00222222
00256011613203eeeeeeeeeeeeeee00222222
00256011613202aaaaaaaaaaaaaaa00333333
00256011613202bbbbbbbbbbbbbbb00333333
00256011613202ccccccccccccccc00333333
00256011613202ddddddddddddddd00333333
00256011613202eeeeeeeeeeeeeee00333333
|
Required output file (record length-58)
Code: |
0025 60 1 16 132 06 aaaaaaaaaaaaaaa 0.2
0025 60 1 16 132 06 bbbbbbbbbbbbbbb 0.2
0025 60 1 16 132 06 ccccccccccccccc 0.2
0025 60 1 16 132 06 ddddddddddddddd 0.2
0025 60 1 16 132 06 eeeeeeeeeeeeeee 0.2
0025 60 1 16 132 03 aaaaaaaaaaaaaaa 0.2
0025 60 1 16 132 03 bbbbbbbbbbbbbbb 0.2
0025 60 1 16 132 03 ccccccccccccccc 0.2
0025 60 1 16 132 03 ddddddddddddddd 0.2
0025 60 1 16 132 03 eeeeeeeeeeeeeee 0.2
0025 60 1 16 132 02 aaaaaaaaaaaaaaa 0.2
0025 60 1 16 132 02 bbbbbbbbbbbbbbb 0.2
0025 60 1 16 132 02 ccccccccccccccc 0.2
0025 60 1 16 132 02 ddddddddddddddd 0.2
0025 60 1 16 132 02 eeeeeeeeeeeeeee 0.2 |
I need to group the records on charcters 1:14 and sum up the last numeric field and write the output file with the last field(numeric-S9(08)V9(06)) as the ratio of original no to the total sum.
ie.
111111/(111111*5) = 0.2
Is it possible by any means using a single SYNCSORT/SYNCTOOL step.?? |
|
Back to top |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
Back to top |
|
|
|