MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Evaluate within Evaluate

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Wed Nov 15, 2006 2:51 am    Post subject: Evaluate within Evaluate Reply with quote

hi ,
In my program, i need to code a evaluate within a Evaluate , but my question is , where do i give a " when Other " condition , in the outer or in the inner evaluate

ex :
Code:

    Evaluate var1 also var2
      when 'a'
             perform ..
      when 'b'
             perform ..
           Evaluate var3
               when 'c'
                  perform ...
               when 'd'
                  perform ..
               when other
                   perform parax
           End-Evaluate
       when other
              perfrom paray
      End-Evalaute.

What will happen if none of the when conditions are satisfied, will "parax "
or "paray" will be executed ?
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 15, 2006 3:52 am    Post subject: Reply with quote

are you under the erroneous impression, that an 'ALSO' requires an evaluate within an evaluate.

the manual is pretty clear on how to code an evaluate. read it.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Wed Nov 15, 2006 4:04 am    Post subject: Reply with quote

hi ,
This is a existing code , and i need to know how "When Other" condition works
in this scenario, can someone pls help me with this ..

ganesh
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 15, 2006 5:07 am    Post subject: Reply with quote

Code:

Evaluate var1 also var2
     when 'a'
             perform ..
     when 'b'
             perform ..
             Evaluate var3
                  when 'c'
                          perform ...
                  when 'd'
                         perform ..
                  when other
                          perform parax
            End-Evaluate
     when other
             perfrom paray
End-Evalaute.


as they say, a picture is worth a thousand words.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
gans79
Beginner


Joined: 31 Aug 2005
Posts: 51
Topics: 27

PostPosted: Wed Nov 15, 2006 5:48 am    Post subject: Reply with quote

hi ,
Thanks for formatting the code, but letme know under what condition will
"parax" or "paray" will be executed
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 15, 2006 6:34 am    Post subject: Reply with quote

when var1 and var2 are not equal to a or b then paray

when var1 and var2 are equal to b AND var3 not equal to c or d then parax
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12370
Topics: 75
Location: San Jose

PostPosted: Wed Nov 15, 2006 7:59 am    Post subject: Reply with quote

Quote:

Thanks for formatting the code, but letme know under what condition will
"parax" or "paray" will be executed


gans79,

The code does NOT even compile as you the arguments you are trying to compare are less. You have 2 arguements on the evaluate stmt but your when stmt has one value to compare.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Thu Nov 16, 2006 2:41 am    Post subject: Reply with quote

gans79,,

Check this link for Evaluate within Evalaute:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG10/1.5.1.1.2?DT=20020923143836#HDRDUP0218
_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group