IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Synctool for getting the ratio in output


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Sep 04, 2007 2:54 am
Reply with quote

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
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Tue Sep 04, 2007 9:44 am
Reply with quote

arcvns
Did you not try with the solution provided by Frank here=>
http://ibmmainframes.com/viewtopic.php?t=24145
The solution provided by frank is good enough to work with SYNCSORT/SYNCTOOL.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
No new posts XDC SDSF output to temp dataset CLIST & REXX 4
Search our Forums:

Back to Top