Diane,

FWIW, I have also tried this but it fails after it sees
the first 2 identifiers.

I have always changed it to "Evaulate True" then placed
my comparisons at each WHEN.  

The manual could be a little more clear IMO.

Terry

> -----Original Message-----
> From: Diane Nott [mailto:dnott@xxxxxxxxxxxxx] 
> 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
> A good landing is one you can walk away from,
> A great landing is one where you can rent the plane afterwards.
> When in doubt, hold on to your altitude. No one has ever 
> collided with the sky.
> 
> 
> _______________________________________________
> This is the COBOL Programming on the iSeries/AS400 
> (COBOL400-L) mailing list
> To post a message email: COBOL400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/cobol400-l
> or email: COBOL400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/cobol400-l.
> 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2022 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.