Previous Topic: Map Paging Status ConditionsNext Topic: Arithmetic and Assignment Command Status Condition


Set Status Condition

Purpose

Tests a set for the presence of member record occurrences or determine whether a record is a member of a specified set.

Note: The set status condition is not allowed for sets whose members are stored in native VSAM data sets.

Syntax

►►────┬─ SET set-name is ──────┬───────┬───── EMPTY ─────┬────────────────────►◄
      │                        └─ NOT ─┘                 │
      └─ SET set-name MEMBER ────────────────────────────┘

Parameters

set-name is EMPTY

Tests the current occurrence of the named set for the presence of member records. The outcome of the test is true only when the specified set has no members.

Set-name must be known to the dialog's subschema.

NOT

Specifies that the set has one or more members for the test to be true.

set-name MEMBER

Tests the current record of run unit to determine whether it participates as a member in any occurrence of the named set.

Set-name must be known to the dialog's subschema.

Example 1: Testing for set member records

The following statements establish a current occurrence of the CUSTOMER-ORDER set and then test to determine whether the set has any member records:

FIND CALC CUSTOMER.
IF SET CUSTOMER-ORDER EMPTY
THEN
    .
    .
    .

Example 2: Testing for a specific member of a set

The following statements establish a POLICY record as current of run unit and then test to determine whether the record is a member of any occurrence of the AGENCY-POLICY set:

OBTAIN CALC POLICY.
IF SET AGENCY-POLICY MEMBER
THEN
    .
    .
    .

More information:

Control Commands