IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

88 level condition ERROR


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sunil kumar reddy B

New User


Joined: 25 Jul 2011
Posts: 2
Location: india

PostPosted: Wed Aug 24, 2011 3:36 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 24, 2011 4:05 pm
Reply with quote

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
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 121
Location: Puerto Rico

PostPosted: Wed Aug 24, 2011 7:28 pm
Reply with quote

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Aug 24, 2011 7:44 pm
Reply with quote

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
View user's profile Send private message
sunil kumar reddy B

New User


Joined: 25 Jul 2011
Posts: 2
Location: india

PostPosted: Thu Aug 25, 2011 1:58 pm
Reply with quote

Thanks to BILL and JOSE
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Aug 25, 2011 6:43 pm
Reply with quote

With level 88 you should use EVALUATE TRUE

Edit: Hello Bill, I'm late again!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts How to load to DB2 with column level ... DB2 6
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top