View previous topic :: View next topic |
Author |
Message |
John Corbin Beginner
Joined: 23 Jan 2004 Posts: 38 Topics: 21
|
Posted: Mon Jan 17, 2005 11:27 am Post subject: REXX SELECT and IF statements appear to be confilcting |
|
|
I keep getting error mesages about unexpected THEN or ELSE in the follwing CODE
SELECT
WHEN PROVCODE.I = 'A' | PROVCODE.I = 'B' THEN DO
LINEC = 0
IF LINEE = 0 THEN
LINEA = LINED*0.15
ELSE
LINEA = LINEE*0.15
LINEB = (LINEA*7)/15
TEMPVAR = LINEB*0.36
IF TEMPVAR < 8750.00 THEN
LINEF = TEMPVAR
ELSE
LINEF = 8750.00
END /* WHEN */
OTHERWISE THEN DO
LINEA = 0
IF LINEE = 0 THEN
LINEC = LINED*0.15
ELSE
LINEC = LINEE*0.15
TEMPVAR = LINEC*0.36
LINEB = 0
IF TEMPVAR < 8750.00 THEN
LINEF = TEMPVAR
ELSE
LINEF = 8750.00
END /* OTHERWISE */
END /* SELECT */
I am not sure but I think that the end clauses are conflicting or I am missing something very obvious. Can anyone help please ? |
|
Back to top |
|
|
John Corbin Beginner
Joined: 23 Jan 2004 Posts: 38 Topics: 21
|
Posted: Mon Jan 17, 2005 2:47 pm Post subject: |
|
|
Found the trouble
There is no THEN DO allowed on the OTHERWISE statement... |
|
Back to top |
|
|
|
|