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

How to compute the percentage on TRAILER3 in Syncsort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Raghunadhareddy.J

New User


Joined: 26 Apr 2011
Posts: 6
Location: INDIA

PostPosted: Thu Apr 28, 2011 4:35 pm
Reply with quote

My report file is as follows.
I need to compute the percentage by diving the second value by first value and percentage should be placed after the second value.

TOTAL 7,441 12
TOTAL 416,744 5,972

Thanks & regards
Raghu
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 28, 2011 4:53 pm
Reply with quote

Quote:
Please do the needful.


ok,
what sort product are you using?
Back to top
View user's profile Send private message
Raghunadhareddy.J

New User


Joined: 26 Apr 2011
Posts: 6
Location: INDIA

PostPosted: Thu Apr 28, 2011 6:35 pm
Reply with quote

we are using sync sort
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Fri Apr 29, 2011 1:56 pm
Reply with quote

Does your input file have only TWO records always? And what is the expected output out of the sample input you have shown above?
Back to top
View user's profile Send private message
Raghunadhareddy.J

New User


Joined: 26 Apr 2011
Posts: 6
Location: INDIA

PostPosted: Fri Apr 29, 2011 2:00 pm
Reply with quote

Hi Arun,

My input has many lines.not only two lines.
where ever we had a line having TOTAL in the report i need to compute the percentage and should be placed after the second value.

Thanks & regards
Raghu
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Fri Apr 29, 2011 9:31 pm
Reply with quote

Why don't you show us a sample input and the expected output using "Code" tags.
Back to top
View user's profile Send private message
Raghunadhareddy.J

New User


Joined: 26 Apr 2011
Posts: 6
Location: INDIA

PostPosted: Wed May 04, 2011 7:32 pm
Reply with quote

Hi Arun,


we can use SUM,MIN,MAX,AVG in TRAILER3 statement in sort.
As TRAILER3 statement does not allow arithmetic operations,created a module using the function NUMVAL-C that converts edited picture declaraions to normal declarations to compute percentage for the total lines on the report.
I am done with my requirement.
Thanks a lot for your time.


Thanks & Regards
Raghu
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Wed May 04, 2011 11:13 pm
Reply with quote

It's good to hear that you've found a way out yourself. But without having any clue on your requirement, I can't just agree to the point that it's not doable with your sort product.
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 Compare only first records of the fil... SYNCSORT 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
No new posts Syncsort "Y2C" Function SYNCSORT 1
No new posts Arithmetic division using Syncsort SYNCSORT 6
Search our Forums:

Back to Top