View previous topic :: View next topic
|
Author |
Message |
sijayapal
New User
Joined: 23 Dec 2008 Posts: 69 Location: India
|
|
|
|
Hi,
Code: |
COMPUTE WS-P2-WRITTEN-PREM ROUNDED =
WS-HOLD12-WRITTEN-PREM.
COMPUTE WS-P2-EARNED-PREM ROUNDED =
WS-HOLD12-EARNED-PREM.
COMPUTE WS-P2-PAID-LOSSES ROUNDED =
WS-HOLD12-PAID-LOSSES.
COMPUTE WS-P2-OS-LOSSES ROUNDED =
WS-HOLD12-OS-LOSSES.
|
Code: |
IF WS-P2-WRITTEN-PREM = ZEROES AND
WS-P2-EARNED-PREM = ZEROES AND
WS-P2-PAID-LOSSES = ZEROES AND
WS-P2-OS-LOSSES = ZEROES
MOVE 'Y' TO WS-ALL-ZEROES-SW
END-IF.
|
if the value is less than 0.5 it is getting rounded to 0.. but the if condition is failing. I do not understand what is the problem. The WS-P2-WRITTEN-PREM has a picture class of -zzzzzzzzz9
WS-HOLD12-WRITTEN-PREM has a pic class of s9(11).99
Please help me in resolving the issue. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
sijayapal wrote: |
but the if condition is failing. I do not understand what is the problem. |
Got zero answers? maybe you should think about the way you asked your question...
WS-P2-WRITTEN-PREM has the format USAGE DISPLAY.
After your compute, the field will have '__________0' (_ stands for space)
It is not a numeric compare: the string '__________0' is not equal to ZERO ('00000000000')
That's why "it fails".
6.1.6.5 General relation conditions |
|
Back to top |
|
|
sijayapal
New User
Joined: 23 Dec 2008 Posts: 69 Location: India
|
|
|
|
Thanks Marso.. |
|
Back to top |
|
|
|