Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Synctool for getting the ratio in output

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Arun Raj

Moderator


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

PostPosted: Tue Sep 04, 2007 2:54 am    Post subject: Synctool for getting the ratio in output
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us