Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Sorting on SUM
 Login/Join
 
<dietcoke>
posted
I have the following print:

TABLE FILE REQUEST
SUM
CNT.PGM_NAME AS 'Nbr X`s, Ran'
RQTR_USER_ID NOPRINT
AND COMPUTE
AVGDAYSPAY/D12.3 = PGM_RUN_TIME_SECS/CNT.PGM_NAME; AS 'Avg Run ,Time (Sec)'
BY PGM_TTL AS 'REPORT'

and I need to sort by the CNT.PGM_NAME. Does anyone know how I can go about doing this?
 
Report This Post
Platinum Member
posted Hide Post
There is a BY TOTAL sort option so I think this will work:
TABLE FILE REQUEST
SUM
CNT.PGM_NAME AS 'Nbr X`s, Ran'
RQTR_USER_ID NOPRINT
AND COMPUTE
AVGDAYSPAY/D12.3 = PGM_RUN_TIME_SECS/CNT.PGM_NAME; AS 'Avg Run ,Time (Sec)'
BY PGM_TTL AS 'REPORT'
BY TOTAL CNT.PGM_NAME
END

You might have to play around with it and use a NOPRINT. I'll try and test it on some code I have...
 
Posts: 118 | Location: DC | Registered: May 13, 2005Report This Post
Gold member
posted Hide Post
The only change I would make from the prior, is to put the BY TOTAL BEFORE the BY pgm-TTL, so that the primary sort at the very end is by the count. Depending on how you want to the report to look, TABLE FILE REQUEST SUM CNT.PGM_NAME AS ... BY TOTAL CNT.PGM_NAME NOPRINT BY PGM_TTL or TABLE FILE REQUEST SUM RQTR_USER_ID ... BY TOTAL CNT.PGM_NAME AS 'Nbr X''s, Ran' BY PGM_TTL AS 'REPORT'. Both versions will count the pgm names BY the pgm_ttl, and then show those reports in order by the count. (you can also use BY HIGHEST.
 
Posts: 60 | Location: 2 penn | Registered: May 22, 2003Report This Post
<dietcoke>
posted
Thanks for your help everyone, I got it figured out. The problem was that I was trying to sort with an aggregate function. So, instead of this:

BY TOTAL CNT.PGM_NAME

I had to SUM the PGM_NAME in one table and hold that file. Then you can use the aggregate value in another table as a BY field. So:

SUM CNT.PGM_NAME AS 'REPORT'

.....(hold table and what have you)

PRINT *
BY REPORT
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders