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.
Hi, Please look at the piece of code, TABLE FILE ABC AAA / D10B = BBB - CCC; END
The output of the above code has brackets replacing negative values, i.e. -10.12 , is displayed as (10). But when say the result of the difference is -0.12, the output is just 0, with no brackets around it.
What should i do to overcome this problem? Expected output is (0)
WebFOCUS 7.6.6 Windows XP Output: Excel, PDF, HTML
As you are not allowing for decimal places in your format,D10B, the -0.12 is marked as zero which I'm assuming FOCUS and WebFOCUS treat as a positive number.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
Either extend the decimal places shown on the field so that your expression is correct or do not use double precision as its format, as double precision retains the true value internally.
You can see what I mean in the code below. Firstly I compute a value based on two numeric fields. The computed output has no decimal places but the result is then passed to a computed field that does have decimal places. I do this twice, once for double precision and once for packed decimal. Comparison of the passed computed value shows that double precision still holds the "true" value whereas packed decimal doesn't.
APP PREPENDPATH IBISAMP
TABLE FILE GGSALES
SUM DOLLARS
BUDDOLLARS
COMPUTE D_DIFF/D10B = 1 - (DOLLARS / BUDDOLLARS);
COMPUTE D_PASS/D10.5B = D_DIFF;
COMPUTE P_DIFF/P10B = 1 - (DOLLARS / BUDDOLLARS);
COMPUTE P_PASS/P10.5B = P_DIFF;
BY REGION
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF, SIZE=9, $
TYPE=DATA, COLUMN=D_PASS, COLOR=RED, WHEN=D_PASS LT 0, $
TYPE=DATA, COLUMN=P_PASS, COLOR=RED, WHEN=P_PASS LT 0, $
ENDSTYLE
END
Rule: Use the correct precision for the task in hand
TThis message has been edited. Last edited by: Tony A,
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004