Removes a record from the set occurrence in which it participates and connects it to the set occurrence specified by the TO list. Before the RECONNECT is performed, DEC DATATRIEVE sets up a currency indicator for each set specified in the TO list. Format RECONNECT 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. The target record must be a member of the sets specified by the TO list. 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 uses nested FOR loops to create the necessary contexts. The procedure uses prompting value expressions to get information from the user. DTR> DEFINE PROCEDURE NEW_MANAGER DFN> FOR G IN GROUPS WITH GROUP_NAME = *."the name of the group" DFN> FOR E IN EMPLOYEES WITH EMP_ID = DFN> *."the id of the new manager" DFN> RECONNECT G TO E.MANAGES DFN> END_PROCEDURE DTR>