Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
Abirami.YN

New User

Joined: 16 Jul 2005
Posts: 15
Location: India - Chennai

 Posted: Wed Dec 14, 2005 6:04 pm    Post subject: Clarification in Evaluate Hi, Can we perform the evaluate function as below? EVALUATE X WHEN 1 THRU 5 COMPUTE X =X+1 WHEN 6 THRU 10 COMPUTE X= X+2 WHEN GREATER THAN EQUAL TO 11 COMPUTE X = X+3 END-EVALUATE. Thanks, Abirami

iknow

Active User

Joined: 22 Aug 2005
Posts: 413

 Posted: Wed Dec 14, 2005 6:12 pm    Post subject: Re: Clarification in Evaluate Hi Abirami, To my understanding your code works fine. Please check my attachment for more information on EVALUATE VERB.
muffirulz

New User

Joined: 14 Sep 2005
Posts: 74
Location: Kentucky, USA

 Posted: Thu Dec 15, 2005 3:23 am    Post subject: Re: Clarification in Evaluate hi there, Your code is fine and it should working an dif you r sure that the value of X can never be zero or less than zero than you can use EVALUATE X WHEN 1 THRU 5 COMPUTE X =X+1 WHEN 6 THRU 10 COMPUTE X= X+2 WHEN OTHER COMPUTE X = X+3 END-EVALUATE.
iknow

Active User

Joined: 22 Aug 2005
Posts: 413

 Posted: Thu Dec 15, 2005 6:14 am    Post subject: Re: Clarification in Evaluate Hi muffirulz, In this case "X" has to be positive(excluding ZERO). Hope this helps.
Abirami.YN

New User

Joined: 16 Jul 2005
Posts: 15
Location: India - Chennai

 Posted: Thu Dec 15, 2005 11:13 am    Post subject: Thanks for ur Reply.
raghunathns

Active User

Joined: 08 Dec 2005
Posts: 127
Location: rochester

 Posted: Thu Dec 15, 2005 2:39 pm    Post subject: I dont think it will work..the last when will fail. change to EVALUATE TRUE WHEN x>0 and X < 6 COMPUTE X =X+1 WHEN x>5 and x <11 COMPUTE X= X+2 WHEN x > 10 COMPUTE X = X+3 END-EVALUATE. the option given by muffirulz also works.
priyesh.agrawal

Senior Member

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

 Posted: Thu Dec 15, 2005 10:41 pm    Post subject: Re: Clarification in Evaluate I agree with raghunathns.... That code doesn't work for me.... Regards, Priyesh.
muffirulz

New User

Joined: 14 Sep 2005
Posts: 74
Location: Kentucky, USA

 Posted: Fri Dec 16, 2005 2:17 am    Post subject: Re: Clarification in Evaluate hi iknow, in my post I have mentioned that x has to be positive and greater than zero buddy regards
iknow

Active User

Joined: 22 Aug 2005
Posts: 413