I had the following code inside a DEFINE FILE block:
CVIGENCI3/A01 = IF STATUS EQ 'B' OR 'A' OR 'S' OR 'R' OR 'Z' OR 'U' THEN
(IF CHG_OFF_PRIN GT 0 THEN
(IF PRIN_BAL1 GT 0 THEN 'Z' ELSE 'P'))
ELSE
IF STATUS EQ 'P' THEN 'T' ELSE
IF STATUS EQ 'O' THEN 'O' ELSE 'F';
For some reason the
IF CHG_OFF_PRIN GT 0 THEN
(IF PRIN_BAL1 GT 0 THEN 'Z' ELSE 'P')) section would go into the nested IF even when the outer IF was false. All I had to do was add an ELSE clause and that fixed the problem. So it ended up like:
IF CHG_OFF_PRIN GT 0 THEN
(IF PRIN_BAL1 GT 0 THEN 'Z' ELSE 'P') ELSE '')
I lost around 2 days' worth of work because of this problem. Can someone explain why this is an issue in WF 7.1.3? And if there's a solution that doesn't involve adding useless ELSE clauses to all nested IFs?
CVIGENCI3/A01 = IF STATUS EQ 'B' OR 'A' OR 'S' OR 'R' OR 'Z' OR 'U' THEN
(IF CHG_OFF_PRIN GT 0 THEN
(IF PRIN_BAL1 GT 0 THEN 'Z' ELSE 'P'))
ELSE
IF STATUS EQ 'P' THEN 'T' ELSE
IF STATUS EQ 'O' THEN 'O' ELSE 'F';
For some reason the
IF CHG_OFF_PRIN GT 0 THEN
(IF PRIN_BAL1 GT 0 THEN 'Z' ELSE 'P')) section would go into the nested IF even when the outer IF was false. All I had to do was add an ELSE clause and that fixed the problem. So it ended up like:
IF CHG_OFF_PRIN GT 0 THEN
(IF PRIN_BAL1 GT 0 THEN 'Z' ELSE 'P') ELSE '')
I lost around 2 days' worth of work because of this problem. Can someone explain why this is an issue in WF 7.1.3? And if there's a solution that doesn't involve adding useless ELSE clauses to all nested IFs?