Technical data
Example 6–1 ROLLBACK Statement
.
.
.
READY-UPDATE.
READY TEST_REALM CONCURRENT UPDATE.
**************************
* FETCH CUSTOMER ROUTINE *
**************************
.
.
.
*******************************
* FETCH ORDERED ITEMS ROUTINE *
*******************************
.
.
.
CREDIT-LIMIT-CHECK.
MULTIPLY ORDERED-QUANTITY BY UNIT-PRICE
GIVING ORDER-AMOUNT.
ADD ORDER-AMOUNT TO TOTAL-AMT.
IF TOTAL-AMT IS GREATER THAN CUST-CREDIT-LIMIT
ROLLBACK
PERFORM CREDIT-LIMIT-EXCEEDED
ELSE PERFORM PRINT-INVOICE-LINE.
6.3 The Owner and Member Test Condition
The FIND OWNER statement finds the owner of the current of set type, which
may not be the same as the current of run unit. Thus, executing a FIND OWNER
WITHIN set-name when the current of run unit record is not connected to the
specified set returns the owner of the member that is current of set type.
Figure 6–2 shows occurrences of the RESPONSIBLE_FOR set type where
employees are responsible for the design of certain parts.
Figure 6–2 Occurrences of the RESPONSIBLE_FOR Set Type
EMP1 EMP4
PART A PART D
EMP2 EMP3
PART R PART Z
PART L
ZK−1509−GE
Example 6–2 uses the data in Figure 6–2 to perform an analysis of PART
D, PART L, and the work of the engineer responsible for each part. The set
retention class is optional.
DML Programming—Tips and Techniques 6–5