Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Evaluate and level 88

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Thu Sep 07, 2006 6:41 pm    Post subject: Evaluate and level 88
Reply with quote

good moorning.....can help me?

please a need help...
i want to use a level 88 at evaluate statement (like this), and receive de following msg compiler error:

The selection object at position 1 in the "WHEN" phrase did not match the type o
subject in the "EVALUATE" statement. The selection object was discarded.

Code Example

01 COD-PEDIDO-AUTORIZACION PIC 9(3).
88 AUTORIZAR
VALUES 28 29 42 550 569 570 571 692 693 695 696.
88 OPOSICION
VALUES 426.
MOVE CLAVE-RESP-0005 TO COD-PEDIDO-AUTORIZACION
EVALUATE COD-PEDIDO-AUTORIZACION
WHEN 0
EXIT
WHEN AUTORIZAR
PERFORM ROLLBACK-DB
MOVE 28 TO NUM-TEXT
MOVE CT-ERROR-LOGICO TO R-RETORNO
MOVE 1 TO IND-MEN787-60B1
PERFORM TRATAR-ERROR
SET CORRECTO TO TRUE
PERFORM PREP-DIA-ERRORSUC
WHEN OPOSICION
PERFORM ROLLBACK-DB
MOVE R-RETORNO TO NUM-TEXT
MOVE CT-ERROR-LOGICO TO R-RETORNO
MOVE 1 TO IND-MEN787-60B1
PERFORM TRATAR-ERROR
SET CORRECTO TO TRUE
PERFORM PREP-DIA-ERRORSUC
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Sep 07, 2006 7:15 pm    Post subject: Re: Evaluate and level 88
Reply with quote

Define it like :-
Code:
01 COD-PEDIDO-AUTORIZACION PIC 9(3).
88 AUTORIZAR
VALUES 28 29 42 550 569 570 571 692 693 695 696.
88 OPOSICION
VALUES 426.
88 ZERO
VALUE 000.


and check for WHEN ZERO
Back to top
View user's profile Send private message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Thu Sep 07, 2006 7:26 pm    Post subject: Re: Evaluate and level 88
Reply with quote

give me the same error.......
add a level 88, and de when....
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Sep 07, 2006 9:11 pm    Post subject: Re: Evaluate and level 88
Reply with quote

did you change your EVALUTAE for checking WHEN ZERO after adding it in 88 level.
Back to top
View user's profile Send private message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Thu Sep 07, 2006 9:27 pm    Post subject: yes..................
Reply with quote

EVALUATE COD-PEDIDO-AUTORIZACION
WHEN CERO
EXIT
WHEN AUTORIZAR
PERFORM ROLLBACK-DB
MOVE 28 TO NUM-TEXT
MOVE CT-ERROR-LOGICO TO R-RETORNO
MOVE 1 TO IND-MEN787-60B1
PERFORM TRATAR-ERROR
SET CORRECTO TO TRUE
PERFORM PREP-DIA-ERRORSUC
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Sep 07, 2006 9:33 pm    Post subject: Re: Evaluate and level 88
Reply with quote

grabeva,

Do as priyesh said, and then change

'EVALUATE COD-PEDIDO-AUTORIZACION '
to
'EVALUATE TRUE'

This will solve your problem, I think.

Dave
Back to top
View user's profile Send private message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Thu Sep 07, 2006 9:38 pm    Post subject: its not possible
Reply with quote

Dave, thanks,
but this its not possible, because
i want to check differente value,
example: 426 ..do....something.-...
28 or 46 or 49 ...do something....
0 exit
y other....do something different....

i'm clear???
thanks again....
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Sep 07, 2006 9:44 pm    Post subject: Re: Evaluate and level 88
Reply with quote

I believe what you want is exactly waht will happen. Give it a try.


the use of the 88 level COD-PEDIDO-AUTORIZACION

is equivalent to coding


COD-PEDIDO-AUTORIZACION = ( 28 or 29 or 42 or 550 or 569 or 570 or 571 or 692 or 693 or 695 or 696 )

And as you can see

EVALUATE COD-PEDIDO-AUTORIZACION
WHEN COD-PEDIDO-AUTORIZACION = ( 28 or 29 or 42 or 550 or 569 or 570 or 571 or 692 or 693 or 695 or 696 )

is not valid

EVALUATE TRUE
WHEN COD-PEDIDO-AUTORIZACION = ( 28 or 29 or 42 or 550 or 569 or 570 or 571 or 692 or 693 or 695 or 696 )

is valid



Dave
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Sep 07, 2006 9:56 pm    Post subject: Re: Evaluate and level 88
Reply with quote

Quote:
Do as priyesh said, and then change

'EVALUATE COD-PEDIDO-AUTORIZACION '
to
'EVALUATE TRUE'

Oh yeah... I missed this one... Thanks Dave...
Back to top
View user's profile Send private message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Thu Sep 07, 2006 10:57 pm    Post subject: suggest.....
Reply with quote

Dave....

if i use evaluate true....can i use "WHEN OTHER" ?????
what can i do with the rest of value?....i need to do something with the rest of the values....(its de "when other" of a normal evaluate)
for example....
88 autorizar value 28 29 570 571
88 oposicion value 426
88 cero value 0

evaluate true
when autorizar ....move 1 to campo
when oposicion ...move 2 to campo
when zero ... exit
when other?????
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Sep 07, 2006 11:19 pm    Post subject: Re: Evaluate and level 88
Reply with quote

Yes,

WHEN OTHER is valid with EVALUATE TRUE

It?s a catch all for when no other condition has been satisfied.

Dave
Back to top
View user's profile Send private message
grabeva

New User


Joined: 07 Sep 2006
Posts: 23

PostPosted: Fri Sep 08, 2006 12:39 am    Post subject: thanks
Reply with quote

thankssssssssssssssssssssssss
gra
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Syncsort TPF Level Majid Hussain SYNCSORT 2 Wed Apr 13, 2016 2:22 am
No new posts Need a logic to validate the data in ... sandeep kumar302 COBOL Programming 17 Mon Feb 01, 2016 3:30 pm
No new posts DB2 10.1 Share level locking and Sele... Mary Lewis DB2 1 Wed Apr 15, 2015 9:51 pm
No new posts CICS SE Level Openings in Accenture enikhilk Mainframe Jobs 0 Mon Sep 01, 2014 6:39 pm
No new posts 88 level variable logic not working sandeep kumar302 COBOL Programming 19 Thu Jul 31, 2014 10:59 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us