Previous Topic: @DISCON Status CodesNext Topic: #ENQ—acquires resources or tests for availability


@DISCON Example

The following example demonstrates the use of the @DISCON statement to remove an EMPLOYEE record from the OFFICE-EMPLOYEE set occurrence. The EMPLOYEE record remains a member in the other set occurrences in which it participates:

MVC   OFFCODE,=CL4'3200'
@FIND CALC,REC='OFFICE'
@FIND FIRST,REC='EMPLOYEE',SET='OFFICE-EMPLOYEE'
@DISCON REC='EMPLOYEE',SET='OFFICE-EMPLOYEE'

The following figure illustrates the above example. To disconnect EMPLOYEE 4 from the OFFICE 1 occurrence of the OFFICE-EMPLOYEE set, enter the database on OFFICE 1, establish EMPLOYEE 4 as current of the EMPLOYEE record type, and disconnect it from the OFFICE-EMPLOYEE set.