Simple but frustrating...
I have this RPGLE code:
H
Dnum3 S 20P 6
/free
num3 = 16 + 14.5 + 27.2;
DSPLY num3;
/end-free
*inlr = *on;
I am expecting 57.7 to display, instead I get 5,770....
I am writing another PGM that pulls decimal numbers from tables with embedded SQL. Then I am trying to get percentages....the numbers are all correct, but missing their decimal positions when displayed (during testing). So I created just this simple math to test the decimal disappearance...
What the heck?
I have this RPGLE code:
H
Dnum3 S 20P 6
/free
num3 = 16 + 14.5 + 27.2;
DSPLY num3;
/end-free
*inlr = *on;
I am expecting 57.7 to display, instead I get 5,770....
I am writing another PGM that pulls decimal numbers from tables with embedded SQL. Then I am trying to get percentages....the numbers are all correct, but missing their decimal positions when displayed (during testing). So I created just this simple math to test the decimal disappearance...
What the heck?
Comment