Coding conditional expressions
Using the IF and EVALUATE statements,
you can code program actions that will be performed depending on the
truth value of a conditional expression.
About this task
You can specify the following conditions:
- Relation conditions, such as:
- Numeric comparisons
- Alphanumeric comparisons
- DBCS comparisons
- National comparisons
- Class conditions; for example, to test whether a data item:
IS NUMERICIS ALPHABETICIS DBCSIS KANJIIS NOT KANJI
- Condition-name conditions, to test the value of a conditional variable that you define
- Sign conditions, to test whether a numeric operand
IS POSITIVE,NEGATIVE, orZERO - Switch-status conditions, to test the status of UPSI switches
that you name in the
SPECIAL-NAMESparagraph - Complex conditions, such as:
- Negated conditions; for example,
NOT (A IS EQUAL TO B) - Combined conditions (conditions combined with logical operators
ANDorOR)
- Negated conditions; for example,
related tasks
Defining switches and flags
Resetting switches and flags
Checking for incompatible data (numeric class test)
Comparing national (UTF-16) data
Testing for valid DBCS characters
Defining switches and flags
Resetting switches and flags
Checking for incompatible data (numeric class test)
Comparing national (UTF-16) data
Testing for valid DBCS characters
related references
UPSI
General relation conditions (COBOL for AIX Language Reference)
Class condition (COBOL for AIX Language Reference)
Rules for condition-name entries (COBOL for AIX Language Reference)
Sign condition (COBOL for AIX Language Reference)
Combined conditions (COBOL for AIX Language Reference)
UPSI
General relation conditions (COBOL for AIX Language Reference)
Class condition (COBOL for AIX Language Reference)
Rules for condition-name entries (COBOL for AIX Language Reference)
Sign condition (COBOL for AIX Language Reference)
Combined conditions (COBOL for AIX Language Reference)