Previous Topic: Boolean FunctionNext Topic: Flag


ConditionName Flag

The 1 to 32 character name of the condition that exists when a designated field has a given value. Condition names are defined with a type of C.

You can define RED, YELLOW, and BLUE as condition names subordinate to W_HUE with values of R, Y, and B, respectively. For example, consider the following working data definition:

1     W_HUE        X 1
        RED        C       'R'
        YELLOW     C       'Y'
        BLUE       C       'B'

RED is true when W_HUE='R', YELLOW is true when W_HUE='Y', and BLUE is true when W_HUE='B', as shown in the following chart.

Values

Condition Names

W_HUE

RED

BLUE

YELLOW

NOT RED

NOT BLUE

NOT YELLOW

'R'

T

F

F

F

T

T

'Y'

F

F

T

T

T

F

'B'

F

T

F

T

F

T

If W_HUE is defined as a nullable field, then you can define NO_HUE as a condition with the value NULL. For example, consider the following working data definition.

1       W_HUE        X 1
          RED        C      'R'
          YELLOW     C      'Y'
          BLUE       C      'B'
          NO_HUE     C      NULL

NO_HUE is true if W_HUE is NULL. Otherwise, it is false. If RED is defined with the value 'R', RED is true when W_HUE='R', unknown if W_HUE IS NULL, and false otherwise, as shown in the following chart.

Values

Condition Names

W_HUE

RED

BLUE

YELLOW

NOT RED

NOT BLUE

NOT YELLOW

NO_HUE

'R'

T

F

F

F

T

T

F

'Y'

F

F

T

T

T

F

F

'B'

F

T

F

T

F

T

F

NULL

U

U

U

U

U

U

T

Condition names cannot be subordinate to date fields or flags. Like field and group names, they must be qualified if they are not unique. If the field where a condition name is subordinate is subscripted, the condition name also must be subscripted.