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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     ON FIELDNAME SUMMARIZE total issues

Read-Only Read-Only Topic
Go
Search
Notify
Tools
ON FIELDNAME SUMMARIZE total issues
 Login/Join
 
Member
posted
We perform calculations with times, so we need calculate everything in seconds, then convert to hh:mm:ss format for display (notice the PEEPS compute below).

When I do a SUMMARIZE command, in HTML or EXL2K format, the hh:mm:ss format total does not show up, but when I use EXL2K FORMULA format, it shows the total hh:mm:ss like I want. I am wondering if WebFOCUS cannot convert to hh:mm:ss because the decimal format is not yet calculated.

Can anyone offer insight as to how to get the total hh:mm:ss for each group to show up?

DEFINE FILE CAR
PEEPS/D12.3 = ( RPM + 5000 ) / 3600;
END
TABLE FILE CAR
PRINT
COMPUTE PEEPSTIMESTAMP/A8 = EDIT ( INT ( PEEPS ) , '$$$$$$99' ) || ':' || EDIT ( INT ( ( PEEPS - INT ( PEEPS ) ) * 60 ) , '$$$$$$99' ) || ':' || EDIT ( ( ( ( PEEPS - INT ( PEEPS ) ) * 60 ) - INT ( ( PEEPS - INT ( PEEPS ) ) * 60 ) ) * 60 , '$$$$$$99' ); AS 'Timestamp'
PEEPS
SEATS
BY COUNTRY
ON COUNTRY SUMMARIZE AS 'Total'
ON TABLE PCHOLD FORMAT &WFFMT.(,,).Select type of display output.
END

We are using WebFOCUS 7.1.3.
 
Posts: 21 | Registered: September 06, 2006Report This Post
Gold member
posted Hide Post
Well,the problem is that we won't /can't SUBTOTAL an alpha field. So, you have to REPEAT the calculation using RECAP, and then instead of SUMMARIZE use SUBFOOT to put out the recap'ed field. I use DEFINE FUNCTION, so I don't type the whole thing too often:

DEFINE FUNCTION DHHMMSS/A12 (SECONDS/D15)
SECSINDAY/I9 = 60 * 60 * 24;
SECSINHOUR/I9 = 60 * 60;
DAYS/I2 = SECONDS/SECSINDAY;
HRS/I2 = (SECONDS - (DAYS * SECSINDAY)) / SECSINHOUR;
MINS/I2 = (SECONDS - (DAYS * SECSINDAY) - (HRS * SECSINHOUR))
/ 60;
SECS/I2 = SECONDS - (DAYS * SECSINDAY) - (HRS * SECSINHOUR)
- (MINS * 60);
DHHMMSS/A12 = FTOA(DAYS,'(F2S)','A2') | 'D ' | FTOA(HRS,'(F2)','A2')
| ':' | FTOA(MINS,'(F2)','A2') | ':' | FTOA(SECS,'(F2)','A2');
END
DEFINE FILE CAR
PEEPS/D15= ( RPM + 5000 ) / 3600;
END
TABLE FILE CAR
PRINT
COMPUTE PEEPSTIMESTAMP/A12 =
DHHMMSS(PEEPS);
PEEPS
SEATS
BY COUNTRY
ON COUNTRY RECAP
SPEEPS/A12 = DHHMMSS(PEEPS);
ON COUNTRY SUBFOOT
"TOTAL "
ON TABLE PCHOLD FORMAT &WFFMT.(,,).Select type of display output.
END

I used A12, because I also include DAY in my calculation, but basically the idea is the same as what you have, just used twice, once in the COMPUTE and again in the RECAP. You can either repeat the whole calculation or do what I did, which was to put it in a DEFINE FUNCTION, so I didn't have to spell it out twice.


WEFOCUS - All releases starting at 4.3.6
MF FOCUS -- All releases starting at 3.8.68
OS/Platfor _ Predominately Z/OS, but all others as swell
Expected Output Format -- *
 
Posts: 60 | Location: 2 penn | Registered: May 22, 2003Report This Post
Member
posted Hide Post
Noreen,

I wish I could use DEFINE FUNCTION, but because we are allowing users to use EXL2K FORMULA, I have to write the ugly EDIT code for each conversion I want to do.

When I run your sample code, I get a blank TOTAL line with nothing on it. And as far as I understand RECAP, it does not put the column total into a neat column, but rather on its own TOTAL line and not lined up with columns. I need that total to appear like a column.

Thanks for your help wit this!
 
Posts: 21 | Registered: September 06, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     ON FIELDNAME SUMMARIZE total issues

Copyright © 1996-2020 Information Builders