Gentle Breeze

[COBOL] EVALUATE ~ END-EVALUATE 본문

⑨ 직무역량강화/zOS COBOL

[COBOL] EVALUATE ~ END-EVALUATE

재령 2009. 8. 8. 15:34
▶ EVALUATE

The EVALUATE statement provides a shorthand notation for a series of nested IF statements. It can evaluate multiple conditions. The subsequent action depends on the results of these evaluations.

사용자 삽입 이미지


- Operands before the WHEN phrase
 
   Are interpreted in one of two ways, depending on how they are specified:

   * Individually, they are called selection subjects.
   * Collectively, they are called a set of selection subjects.

- Operands in the WHEN phrase
 
  Are interpreted in one of two ways, depending on how they are specified:

  * Individually, they are called selection objects
  * Collectively, they are called a set of selection objects.

- ALSO
  
  Separates selection subjects within a set of selection subjects;
  separates selection objects within a set of selection objects.
 
- THROUGH and THRU
 
  Are equivalent.

▶ END-EVALUATE phrase

This explicit scope terminator serves to delimit the scope of the EVALUATE statement. END-EVALUATE permits a conditional EVALUATE statement to be nested in another conditional statement.

▶ EVALUATE ~ END-EVALUATE example

사용자 삽입 이미지

'⑨ 직무역량강화 > zOS COBOL' 카테고리의 다른 글

[COBOL] PERFORM statement <2>  (0) 2009.08.08
[COBOL] PERFORM statement <1>  (0) 2009.08.08
[COBOL] COMPUTE  (0) 2009.08.08
[COBOL] NUMBER FUNCTIONS  (0) 2009.08.08
[COBOL] NUMVAL / NUMVAL-C FUNCTION  (0) 2009.08.05
Comments