View previous topic :: View next topic |
Author |
Message |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Fri Aug 19, 2005 9:14 am Post subject: EVALUATE - AND/ALSO diff??? |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Aug 19, 2005 10:07 am Post subject: |
|
|
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 |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Fri Aug 19, 2005 10:36 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Aug 19, 2005 10:42 am Post subject: |
|
|
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 |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Fri Aug 19, 2005 10:54 am Post subject: |
|
|
Thanks kolusu, I will try this and let you know. |
|
Back to top |
|
 |
|
|