Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message

New User

Joined: 26 Apr 2011
Posts: 6
Location: INDIA

 Posted: Thu Apr 28, 2011 4:35 pm    Post subject: How to compute the percentage on TRAILER3 in Syncsort 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

dbzTHEdinosauer

Global Moderator

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

Posted: Thu Apr 28, 2011 4:53 pm    Post subject:

ok,
what sort product are you using?

New User

Joined: 26 Apr 2011
Posts: 6
Location: INDIA

 Posted: Thu Apr 28, 2011 6:35 pm    Post subject: Reply to: How to compute the percentage on TRAILER3 statemen we are using sync sort
Arun Raj

Moderator

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

 Posted: Fri Apr 29, 2011 1:56 pm    Post subject: Does your input file have only TWO records always? And what is the expected output out of the sample input you have shown above?

New User

Joined: 26 Apr 2011
Posts: 6
Location: INDIA

 Posted: Fri Apr 29, 2011 2:00 pm    Post subject: 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
Arun Raj

Moderator

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

 Posted: Fri Apr 29, 2011 9:31 pm    Post subject: Why don't you show us a sample input and the expected output using "Code" tags.

New User

Joined: 26 Apr 2011
Posts: 6
Location: INDIA

 Posted: Wed May 04, 2011 7:32 pm    Post subject: 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
Arun Raj

Moderator

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

 Posted: Wed May 04, 2011 11:13 pm    Post subject: 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.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us