Module 5: Data Division
CONDITION NAME (Level 88)
- A conditional name (example:- MALE) must always be associated with conditional variable(EMP-GENDER). A condition name cannot be defined independently. A condition name is specified with value or set of values. The condition name becomes true whenever the conditional variable contains any of these values Otherwise, the condition name is set to false
- Basic syntax:-
Syntax format 1:-
88 condition-name VALUE literal|figurative constant
Syntax format 2:-
88 condition-name VALUE literal-1, literal-2, literal-3….
Syntax format 1:-
88 condition-name VALUE literal-1 THRU|THROUGH literal-n.
- Important rules to be considered while using condition names:-
- It must be declared at special level number 88.
- The level number must begin in Margin A or any position after it. Condition name must begin from Margin B or any position after it.
- Normal data name naming rules also apply to condition name
- If condition name with same name is declared under multiple condition variables, the condition name must be qualified by the name of its conditional variable
- VALUE clause between condition name and conditional variable must not conflict
- When the THRU/THROUGH phrase is used, literal-1 must be less than literal-n
- A conditional variable can be an elementary or group data item. However it cannot be 66 level item, another condition name, group containing JUSTIFY clause, declared with SYNC clause or USAGE clause other than DISPLAY