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
August 10, 2018, 01:03 PM
BabakNYC
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
August 10, 2018, 01:08 PM
Shingles
Nevermind... I didn't put the "-" in front of the RUN. Damnit!