Technical data

4.5.1 Tenancy Conditions
These conditions determine whether a record in the database is an owner, or
member, or a tenant in one or more sets.
General Format
NOT
set-name
OWNER
MEMBER
TENANT
set-name
is a subschema set name.
The result of the test is true if the current record of the run unit is as follows:
Owner of an occurrence of set-name (OWNER clause)
Member of an occurrence of set-name (MEMBER clause)
Owner or member of an occurrence of set-name (TENANT clause)
Otherwise, the result of the test is false. For example:
IF PART_USES OWNER PERFORM 100-PART-OWNER.
IF PART_USED_ON MEMBER . . .
IF RESPONSIBLE_FOR TENANT . . .
If NOT is used, the result of the test is reversed.
Omitting set-name allows all subschema set types in which the record participates
to be considered in determining the truth value of the condition.
If the run-unit currency indicator is null, a database exception condition
occurs and DB-CONDITION is set to DBM$_CRUN_NULL. If the run-unit
currency indicator only specifies a position, a database exception condition
occurs and DB-CONDITION is set to DBM$_CRUN_POS. See Section 4.8.3,
Exception Conditions and the USE Statement for information on USE FOR
DB-EXCEPTION.
4.5.2 Empty Condition
The empty condition determines whether member records are present in one
or more sets. Only member record types defined in the Subschema Section are
considered in determining the truth value of the condition.
General Format
set-name IS
NOT
EMPTY
set-name
is a subschema set name.
If set-name is specified, the object set is the current set of that set type. If the
object set has no member records, the result of the test is true. If the object set
has member records, the result of the test is false.
If set-name is not specified, the object sets, if any, are owned by the current record
of the run unit whose set type is defined in the Subschema Section. If each object
set has no member records, the result of the test is true. If any object set has
member records, the result of the test is false. For example:
Procedure Division 4–7