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: 2276
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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm


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