Diane,

Try the following.

EVALUATE RS-SUMG ALSO RS-SUGW ALSO RS-FALLG ALSO RS-FALLW
  WHEN ' ' ALSO ' ' ALSO ' ' ALSO 'X'  ADD 1 TO WS-PATTERN1
  WHEN ' ' ALSO ' ' ALSO 'X' ALSO ' '  ADD 1 TO WS-PATTERN2
  WHEN ' ' ALSO ' ' ALSO 'X' ALSO 'X'  ADD 1 TO WS-PATTERN3
  WHEN ' ' ALSO 'X' ALSO ' ' ALSO ' '  ADD 1 TO WS-PATTERN4
<repeat for rest of test cases>
END-EVALUATE

Hope this helps!
Richard Casey


-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx]On Behalf Of Diane Nott
Sent: Tuesday, March 25, 2003 12:25 PM
To: cobol400-l@xxxxxxxxxxxx
Subject: Evaluate Statement


I have a question on the use of the Evaluate Statement. I have been 
trying to evaluate 4 variables at once. I tried this format and the
compiler yelled at me. Any suggestions?
Diane

EVALUATE RS-SUMG RS-SUMW RS-FALLG RS-FALLW
             WHEN   ' ', ' ', ' ', 'X'  ADD 1 TO WS-PATTERN1
             WHEN   ' ', ' ', 'X', ' '  ADD 1 TO WS-PATTERN2
             WHEN   ' ', ' ', 'X', 'X'  ADD 1 TO WS-PATTERN3
             WHEN   ' ', 'X', ' ', ' '  ADD 1 TO WS-PATTERN4
             WHEN   ' ', 'X', ' ', 'X'  ADD 1 TO WS-PATTERN5
             WHEN   ' ', 'X', 'X', 'X'  ADD 1 TO WS-PATTERN6
             WHEN   'X', ' ', ' ', ' '  ADD 1 TO WS-PATTERN7
             WHEN   'X', ' ', ' ', 'X'  ADD 1 TO WS-PATTERN8
             WHEN   'X', ' ', 'X', ' '  ADD 1 TO WS-PATTERN9
             WHEN   'X', ' ', 'X', 'X'  ADD 1 TO WS-PATTERN10
             WHEN   'X', 'X', ' ', ' '  ADD 1 TO WS-PATTERN11
             WHEN   'X', 'X', ' ', 'X'  ADD 1 TO WS-PATTERN12
             WHEN   'X', 'X', 'X', ' '  ADD 1 TO WS-PATTERN13
             WHEN   'X', 'X', 'X', 'X'  ADD 1 TO WS-PATTERN14
           END-EVALUATE.

-- 
Diane Nott, AT 205, Ext 7268, IS&S.
Lorain County Community College
Computer Resource Specialist



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.