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.
My dataset has 100 records, and is sorted on a field called "Cycle Days'.
The report only shows the count of records for the lowest 90% of "Cycle Days" values in the dataset. So in the case of 100 records, it only displays 90 in the summary.
Sometimes this count value is off, which appears to be because WebFOCUS is only displaying the numbers to the left of the decimal place if the 90% is not a whole number.
For example, if there are 232 records, I get 208 from the CNT. field, but what I want is 209.
Is there a way to apply rounding to a "CNT." field?
DEFINE FILE TOTAL02
COL0/A50= 'New Hires;
END
TABLE FILE TOTAL02
SUM
CNT.CYCLE_DAYS AS '10PCTCUT'
BY COL0 AS 'METRIC'
ON TABLE HOLD AS 'NHCUT'
END
This message has been edited. Last edited by: ColdWhiteMilk,
I don't see how the 90% cut-off gets imposed -- apparently it's upstream from the code you posted, in a section that pulls TOTAL02 in the first place. And that's where your "rounding" issue would lie.This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
If you are doing the arithmetic using floating point numbers, consider using fixed point numbers so that you may have more control over the precision. Take a look at 'half adjust' via Google for some insights re rounding. HTH
jimster06 DevStu WF 7.6.11 W7 HTML, PDF, EXL2K
Posts: 252 | Location: USA | Registered: April 15, 2003
I tried without -RUN after SET DMPRECISION =0, it works fine in WF 8.0. But I remember in WF 7 release we need to explicitly mention -RUN after SET DMPRECISION=0. Not sure if IBI made any internal changes for this.
The right-hand side expression &RECORDS * .90 is computed in floating-point, and then converted to an integer value (with truncation) which is stored in &TOTAL01PCT
You need to force rounding on the RHS:
-SET &TOTAL01PCT= INT((&RECORDS * .90) + 0.5);
(There used to be a function for rounding, but it was withdrawn from the product.)
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005