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.

New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.

What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.

During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Precision in variables

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Precision in variables
 Login/Join
 
Platinum Member
posted
Hello,

Seems I'm having trouble with the precision of a variable. I learned about DMPPRECION but I'm not getting the desired results. Here is some code:

...
SET DMPRECISION = 5
RUN
GRAPH FILE OFFICER_METRIC
...
-SET &BAR_MAX_1 = IF &A GT &B THEN &A ELSE &B;  //Just using A, B and C to keep it simple here
-SET &BAR_MAX_2 = IF &C GT &BAR_MAX_1 THEN &C ELSE &BAR_MAX_1;
-SET &BAR_MAX_FINAL = &BAR_MAX_2 * 1.1;

-TYPE BAR_MAX_1 is &BAR_MAX_1           //Spits out 0.29
-TYPE BAR_MAX_2 is &BAR_MAX_2           //Spits out 0.29
-TYPE BAR_MAX_FINAL is &BAR_MAX_FINAL   //Spits out 0
...


BAR_MAX_FINAL should be 0.319 right?, but it seems its ignoring decimals or taking the floor (I don't know). I tried to multiply by 11 and divide by 10 but the results are the same as above. I tried several other things with no success.

Any tips here?

Thank you,

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 190 | Registered: May 19, 2017Report This Post
Virtuoso
posted Hide Post
I've no idea what this code is doing. Could you give us an example we can run using sample data?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Nevermind... I didn't put the "-" in front of the RUN. Damnit!


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 190 | Registered: May 19, 2017Report 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     [SOLVED] Precision in variables

Copyright © 1996-2020 Information Builders