Technical data
Example 6–3 RECONNECT Statement
.
.
.
GET-WORK-STATION.
MOVE 2 TO WORK_STATION_ID.
FIND FIRST WORK_STATION USING WORK_STATION_ID.
MOVE "R" TO ASSEMBLY_ID.
FIND FIRST ASSEMBLY USING ASSEMBLY_ID
RETAINING ASSEMBLY_SET.
*********************************************************
* The RETAINING clause retains work station 2 as *
* current of ASSEMBLY_SET. Otherwise, the found member *
* would be current of set and the RECONNECT would fail. *
*********************************************************
RECONNECT ASSEMBLY WITHIN ASSEMBLY_SET.
.
.
.
Figure 6–6 Occurrence Diagram After RECONNECT
ASSEMBLY_SET
ASSEMBLY E ASSEMBLY A
WORK STATION
1
ASSEMBLY C ASSEMBLY R
WORK STATION
2
ZK−1514−GE
ASSEMBLY K ASSEMBLY B
ASSEMBLY J
WORK STATION
3
ASSEMBLY H
WORK STATION
4
ASSEMBLY F
6.8 ERASE ALL
The ERASE statement deletes one or more records from the database. However,
it can delete more than you intended. Accidental deletes can occur because of the
ERASE statement’s cascading effect. The cascading effect can happen whenever
the erased record is the owner of a set. Thus, if the current record is an owner of
a set type, an ERASE ALL deletes:
• The current record.
• All records in sets owned by the current record.
• Any records in sets owned by those members. Note that this is a repetitive
process.
This is called a cascading delete.
6–10 DML Programming—Tips and Techniques