I've done quit a bit of searching, but I'm unable to find any help on doing math with float/decimal as when I try it, it fails.. I'm just trying to get the percentage of the two, so I need it to be a float/decimal. What am I missing?
-DEFAULTH &NOTCOMPLIANT=3.0;
-TYPE NOTCOMPLIANT = &NOTCOMPLIANT;
-DEFAULTH &COMPLIANTTOTAL=126.0;
-TYPE COMPLIANTTOTAL = &COMPLIANTTOTAL;
-DEFAULTH &PERC = 0.0;
-* The following doesn't seem to work.
-SET &PERC=(&NOTCOMPLIANT / &COMPLIANTTOTAL);
-* The following shows 0.
-TYPE PERC = &PERC;
-DEFAULTH &TOTPERC = 0.0;
-SET &TOTPERC=(1-&PERC);
-TYPE TOTPERC = &TOTPERC;
This message has been edited. Last edited by: GavinL,
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
July 29, 2015, 04:12 PM
Francis Mariani
Gavin, Dialogue Manager works with strings. Sometimes the strings can be numbers, but by default they're considered integers.
Use
SET DMPRECISION = {OFF|n}
to set a number precision in Dialogue Manager.
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