‎2006 Nov 22 2:41 PM
Hi,
i have calculations in my program with packed decimals
x / y both x and y are packed decimals.
unfortunately y got some value 0.00 and throughing dump while executing the program.
is it appropriate to write <b>if y eq '0.00'
replace '0.00' with '1.00'
endif.
x/y</b>
‎2006 Nov 22 2:46 PM
Hi,
Yes, you can.
Also you can code like this.
IF Y IS INITIAL.
Y = 1.
ELSE.
...
ENDIF.
Regards,
Ferry Lianto
‎2006 Nov 22 2:44 PM
why dont you just use
if y eq 0.
y = 1.
endif.
This code should work
‎2006 Nov 22 2:44 PM
it depends on ur logic and validations.
If u want an error message u can give error message or else if u want the value then u can use the logic mentioned.\if y eq '0.00'
replace '0.00' with '1.00'
endif.
x/y
‎2006 Nov 22 2:46 PM
Hi,
Yes, you can.
Also you can code like this.
IF Y IS INITIAL.
Y = 1.
ELSE.
...
ENDIF.
Regards,
Ferry Lianto
‎2006 Nov 22 2:48 PM