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

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


Joined: 27 Jun 2006
Posts: 18
Topics: 16

PostPosted: Mon Jan 31, 2011 7:59 am    Post subject: Evaluate Reply with quote

Hi,
How it should be written using evaluate statement

When A
When B

and Test > spaces

can it be written like this

1)When A also B and test > spaces
2)When A OR B and test > spaces

which one is most appropriate

Thanks

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


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

PostPosted: Mon Jan 31, 2011 10:53 am    Post subject: Reply with quote

you need to define your rules.

A or B is not the same as A ALSO B.

if > spaces is a primary decision point in the matrix, you have a very poor example for using an EVALUATE.

Code:

IF  test > spaces
then
    evaluate true
          when A
          when B
    end-evaluate
end-if

and the above resolves to A and not B when A is true, regardless of B.

define your requirements.

you should also spend some time reading the
programmers guide, especially "Coding a choice of actions" in topic 1.5.1.1
as well as the language reference for the Evaluate statement
6.2.13.2 Determining values
6.2.13.3 Comparing selection subjects and objects
6.2.13.4 Executing the EVALUATE statement
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
badri5
Banned


Joined: 27 Jun 2006
Posts: 18
Topics: 16

PostPosted: Tue Feb 01, 2011 3:26 am    Post subject: Reply with quote

Hi,
How it should be written using evaluate statement

When A
When B

and Test > spaces

can it be written like this

1)When A also B and test > spaces

I have deleted the 2nd condition
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


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

PostPosted: Tue Feb 01, 2011 3:47 am    Post subject: Reply with quote

uhmmmmm, impossible to test, huh?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 629
Topics: 176
Location: Stockholm, Sweden

PostPosted: Tue Feb 01, 2011 6:13 am    Post subject: Difficult to say based on your text Reply with quote

Do you mean that you test for Test > spaces, and if that is the case, you then test A /B or .....

Personally, I would code like this (if this is what you mean)
Code:

evaluate true
  when test <= ' '
*    test is spaces or nulls - we're not interested
      continue
  when A = ????
      perform this
  when B = ????
      perform that
  when other
      display 'Unexpected combination - serious error ?????'
end-evaluate
Back to top
View user's profile Send private message Send e-mail
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