View previous topic :: View next topic
|
Author |
Message |
sunil kumar reddy B
New User
Joined: 25 Jul 2011 Posts: 2 Location: india
|
|
|
|
Code: |
05 WS-CONDITION PIC X(05).
88 xxxxxxxxx VALUE '81418' '81431'
'81491' '81701' '81703'
'81746'
'81704' '81709' '81718'
'81721' '81731'.
88 yyyyyyyyy VALUE '81425' '81426'
'81711' '81712' '81725'
'81726' '81727' '81728'
'81729' '81732' '81733'
'81734' '81735' '81736'.
EVALUATE WS-CONDITION
WHEN xxxxxxxxx
PERFORM 8100-PARA THRU 8100-EXIT
WHEN yyyyyyyyy
PERFORM 8105-PARA THRU 8105-EXIT
END-EVALUATE |
hi above is my code. while compiling i am facing the below ERROR.
please any one can help me.
THE SELECTION OBJECT AT POSITION 1 IN THE "WHEN" PHRASE DID NOT MATCH THE TYPE OF THE CORRESPONDING SELECTION SUBJECT IN THE "EVALUATE" STATEMENT.
THE SELECTION OBJECT WAS DISCARDED.
thanks inadvance. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Did you check in the manuals (link at the top of the page) when you got your error?
If you want to use condition names (like I would) you'd need to use EVALUATE TRUE (or FALSE, if that is what you want).
Your first half of the EVALUATE is the literal-bound version.
EVLUATE dataname
WHEN "12345"
...
WHEN "23456"
...
WHEN OTHER
....
END-EVALUATE |
|
Back to top |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
Good day to all!
Is your subject (ws-condition) a numeric field? If so, then make your 88 level condition values numeric. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Jose Mateo wrote: |
Good day to all!
Is your subject (ws-condition) a numeric field? If so, then make your 88 level condition values numeric. |
Code: |
05 WS-CONDITION PIC X(05).
|
don't think so.
The TS already received the correct advice from Bill. |
|
Back to top |
|
|
sunil kumar reddy B
New User
Joined: 25 Jul 2011 Posts: 2 Location: india
|
|
|
|
Thanks to BILL and JOSE |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
With level 88 you should use EVALUATE TRUE
Edit: Hello Bill, I'm late again! |
|
Back to top |
|
|
|