Makes explicit connections between a record and the Oracle CODASYL DBMS sets you specify in the TO list. Before establishing the connections, DEC DATATRIEVE sets up a currency indicator for each set specified in the TO list. Format CONNECT context-name-1 [TO] {[context-name-2.] set-name-1} [,...]
1 – Arguments
context-name-1 Is the name of a valid context variable or the name of a collection with a selected record. It must identify a record occurrence of a domain with a record type that participates in the specified set type. That record must not be a member of the sets specified by the TO list, but its record type must be a valid member type in the specified set types. context-name-2 Is the name of a valid context variable or the name of a collection with a selected record. It must identify a record that participates in the specified set. If the SYSTEM owns the set, you do not need to establish a context for the set. If the set is not owned by the SYSTEM and the context name is not present, DEC DATATRIEVE uses the most recent single record context of a domain with a record type that participates in the specified set type. set-name Is the name of a set type.
2 – Example
The following example connects an employee named Hill to a part LA36 in the RESPONSIBLE_FOR set. P and E in the following example are context names. E refers to a collection with a selected record and P to a record stream. The records in these contexts are all owner records or member records in the set. DTR> FIND E IN EMPLOYEES WITH EMP_LAST_NAME = "HILL" DTR> SELECT 1 DTR> FOR P IN PART WITH PART_DESC = "LA36" CON> CONNECT P TO E.RESPONSIBLE_FOR DTR>