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
 

 

How to compute the percentage on TRAILER3 in Syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to compute the percentage on TRAILER3 in Syncsort
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: 6968
Location: porcelain throne

PostPosted: Thu Apr 28, 2011 4:53 pm    Post subject:
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    Post subject: Reply to: How to compute the percentage on TRAILER3 statemen
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: 2285
Location: @my desk

PostPosted: Fri Apr 29, 2011 1:56 pm    Post subject:
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    Post subject:
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: 2285
Location: @my desk

PostPosted: Fri Apr 29, 2011 9:31 pm    Post subject:
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    Post subject:
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: 2285
Location: @my desk

PostPosted: Wed May 04, 2011 11:13 pm    Post subject:
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    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 ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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