Technical data

CONNECT
CONNECT
Function
The CONNECT statement inserts the current record of the run unit as a member
record into one or more sets. The set occurrence for each insertion is determined
by the currency indicator for the corresponding set type.
General Format
CONNECT
record-name
TO
{ set-name } . . .
ALL
RETAINING
REALM
RECORD
SET
set-name
...
set-name
...
CURRENCY
ON ERROR stment NOT ON ERROR stment2
END-CONNECT
record-name
names a subschema record type.
set-name
names a subschema set type.
stment
is an imperative statement executed for an on error condition.
stment2
is an imperative statement executed for a not on error condition.
Syntax Rules
1. Record-name must reference a subschema record type.
2. Set-name must reference a subschema set type.
3. For each set-name in the TO set-name clause, the record type of record-name
must be a member record type of the set type.
4. The same set-name cannot be specified more than once in the TO set-name
clause.
5. The same set-name cannot be specified more than once in the RETAINING
clause.
Procedure Division 4–23