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 

EVALUATE - AND/ALSO diff???

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Fri Aug 19, 2005 9:14 am    Post subject: EVALUATE - AND/ALSO diff??? Reply with quote

Pls check the evaluate statement, do u think this will work well, as I am checking for only single condition in the last when st.

i have changed the code to single true condition, but I want to stick to the first code as I am checking for two conditions. what is the difference between the two( Using AND and ALSO) .any suggestions??


Code:

ROCESS-PARA

    EVALUATE TRUE ALSO TRUE                         

       WHEN WS-RA = 1 ALSO VISION = 'C'

           PERFORM 5030-WRITE-QTB                 

       WHEN WS-RA = 4 ALSO VISION = 'H'

           PERFORM 5030-WRITE-QTB                 
       WHEN WS-RA = ??                           

          PERFORM 5030-WRITE-QTB                   

    END-EVALUATE.                                 
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Aug 19, 2005 10:07 am    Post subject: Reply with quote

vak255,

Your code will NOT compile as the no: of arguements vs subjects are not the same. you need to code the other ALSO condition on the last when.

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Fri Aug 19, 2005 10:36 am    Post subject: Reply with quote

I need to check ws-ra = ?? and the other condition is ignored. Is there any way that I can do a dummy condition

Quote:

WHEN WS-RA = 4 ALSO VISION = 'H'

PERFORM 5030-WRITE-QTB
WHEN WS-RA = ??

PERFORM 5030-WRITE-QTB
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Aug 19, 2005 10:42 am    Post subject: Reply with quote

vak255,

You can use ANY to check for the just the one variable. Try this

Code:

EVALUATE TRUE ALSO TRUE                         

       WHEN WS-RA = 1 ALSO VISION = 'C'

           PERFORM 5030-WRITE-QTB                 

       WHEN WS-RA = 4 ALSO VISION = 'H'

           PERFORM 5030-WRITE-QTB                 
       WHEN WS-RA = ??  ALSO ANY                       

          PERFORM 5030-WRITE-QTB                   

    END-EVALUATE.           



Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Fri Aug 19, 2005 10:54 am    Post subject: Reply with quote

Thanks kolusu, I will try this and let you know.
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 -> Application Programming 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