TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

COBOL - Conditional Expression

A conditional expression causes the object program to select alternative paths of control, depending on the truth value of a test. Conditional expressions are specified in IF, EVALUATE, PERFORM, and SEARCH statements.

A conditional expression can be specified in either simple conditions or complex conditions. Both simple and complex conditions can be enclosed within any number of paired parentheses; the parentheses do not change whether the condition is simple or complex.

Simple Conditions

There are five simple conditions:
  1. If condition

  2. Class condition

  3. Condition-name condition

  4. Relation condition

  5. Sign condition

  6. Switch-status condition

A simple condition has a truth value of either true or false.

If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal