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     arithmetic w/ &vars w/ decimal points

Read-Only Read-Only Topic
Go
Search
Notify
Tools
arithmetic w/ &vars w/ decimal points
 Login/Join
 
Expert
posted
-SET &FRED = 2.5 ;
-SET ÐEL = 2.4 ;
-SET &LUCY = 0.0 ;
-SET &LUCY = &FRED + ÐEL ;
-TYPE &LUCY

no matter what i do, i get LUCY=4
I want LUCY = 4.9
I've stuck .EVAL everywhere, no cigar.

Banging head against wall....




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
Decimals are stripped from DM calculations. Apparently you can use FTOA to get the decimals:Decimal Calculations in DM


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
There is a new setting called DMPRECISION which I have not used that you might find useful.
quote:
DMPRECISION
The DMPRECISION parameter specifies numeric precision in Dialogue Manager -SET commands.

Without this setting, results of numeric calculations are returned as integer numbers, although the calculations themselves employ double-precision arithmetic. To return a number with decimal precision without this setting, you have to enter the calculation as input into subroutine FTOA, where you can specify the number of decimal places returned.

The syntax is:

SET DMPRECISION = {OFF|n}
where:

OFF
Specifies truncation without rounding after the decimal point. OFF is the default value

n
Is a positive number from 0-9, indicating the point of rounding. Note that n=0 results in a rounded integer value.



Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
susannah, -5.5 points for not knowing that! Big Grin


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
i know i know
banging head THRU wall.
GINNY ROCKS!
i hope it works in 768
IT DOES!
ah...




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
Thanks Ginny. SET DMPRECISION Command available from 7.6.0 onwards.
Here is a code snippet.

-SET &ECHO=ALL;
SET DMPRECISION=0
-RUN
-SET &LUCY_0 = 5/3;
-TYPE &LUCY_0 
SET DMPRECISION=1
-RUN
-SET &LUCY_1 = 5/3;
-TYPE &LUCY_1 
SET DMPRECISION=2
-RUN
-SET &LUCY_2 = 5/3;
-TYPE &LUCY_2 
SET DMPRECISION=3
-RUN
-SET &LUCY_3 = 5/3;
-TYPE &LUCY_3 


Note: -RUN after each DMPRESISION set command.

This message has been edited. Last edited by: Ram Prasad E,
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report 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     arithmetic w/ &vars w/ decimal points

Copyright © 1996-2020 Information Builders