MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

REXX SELECT and IF statements appear to be confilcting

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
John Corbin
Beginner


Joined: 23 Jan 2004
Posts: 38
Topics: 21

PostPosted: Mon Jan 17, 2005 11:27 am    Post subject: REXX SELECT and IF statements appear to be confilcting Reply with quote

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
View user's profile Send private message
John Corbin
Beginner


Joined: 23 Jan 2004
Posts: 38
Topics: 21

PostPosted: Mon Jan 17, 2005 2:47 pm    Post subject: Reply with quote

Found the trouble

There is no THEN DO allowed on the OTHERWISE statement...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group