I need to add a condition to an RPG program that compares a variable to a negative value.
The current code:
A SUB B Diff
Diff ifle 5
.
.
.
endif
where A is larger than B and Diff is a 2 length 0 Decimal variable.
Need to change it so that the statement comes out as:
A - B = Diff
if Diff is less than -15(diff is -14 to 0)... endif
Is this formula correct for calculating rate?
x Div y quot
MVR remain
remain MULT 100 rate
where
length dec
quot 3 3
remain 3 3
rate 3 3
The code is in RPG so I'm not sure if I can use %REM instead of MVR and I can't use /Free either.
The current code:
A SUB B Diff
Diff ifle 5
.
.
.
endif
where A is larger than B and Diff is a 2 length 0 Decimal variable.
Need to change it so that the statement comes out as:
A - B = Diff
if Diff is less than -15(diff is -14 to 0)... endif
Is this formula correct for calculating rate?
x Div y quot
MVR remain
remain MULT 100 rate
where
length dec
quot 3 3
remain 3 3
rate 3 3
The code is in RPG so I'm not sure if I can use %REM instead of MVR and I can't use /Free either.