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. Format - CONNECT [ record-name ] TO { { set-name } ... } { ALL } [ [{| REALM |}] ] [ RETAINING [{| RECORD |}] CURRENCY ] [ [{| { SET [ set-name ] ... } |}] ] [ [{| { { set-name } ... } |}] ] [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-CONNECT ]
1 – record-name
names a subschema record type.
2 – set-name
names a subschema set type.
3 – stment
is an imperative statement.