TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

282 Chapter6
Host Language Access
COBOL II
PERFORM 1100-GET-ERROR-AND-EXPLAIN
END-IF
ELSE
DISPLAY CLEAR SCREEN
DISPLAY SPACE
DISPLAY SPACE
DISPLAY SPACE
DISPLAY SPACE
DISPLAY "***************************************"
DISPLAY "** During Terminal Interaction *"
DISPLAY "** Data On Account Number ",
KEY-ITEM-VALUE
DISPLAY "** Has Been Modified."
DISPLAY "** *"
DISPLAY "** Please Try Again. *"
DISPLAY "Press Enter to Continue ---------->"
NO ADVANCING
ACCEPT OPTION FREE
END-IF
END-IF
MOVE "Update Entry On Customer Set End" TO TEXT1
MOVE 16 TO TEXTLEN
CALL "DBEND" USING DBNAME, TEXT1, DB-MODE, STATUS1, TEXTLEN
IF CONDITION NOT = 0 THEN
PERFORM 1100-GET-ERROR-AND-EXPLAIN
END-IF
CALL "DBUNLOCK" USING DBNAME, CUSTOMER-MASTER, DB-MODE,
STATUS1
IF CONDITION NOT = 0 THEN
PERFORM 1100-GET-ERROR-AND-EXPLAIN
END-IF
END-IF.
Deleting an Entry
This paragraph implements the DELETE-A-PRODUCT routine of the sample program. The
delete operation is achieved by a call to DBDELETE. This call is preceded by a call to DBGET
in mode 7, which locates the entry for the delete operation. These calls are bracketed by
calls to DBBEGIN and DBEND, which designate the beginning and the end of a
TurboIMAGE/XL transaction.
Using calls to DBLOCK and DBUNLOCK in mode 3, the required resources are locked before
the start of the transaction and released after its end.
Exceptional condition code 17 is trapped after the DBGET call. This indicates that the
requested entry does not exist in the Product data set.
******************************************************************
* ACCESS : Mode 1 - Shared Modify Access
*
* Called By: 30-DO-ACTION
*
* Calls : DBLOCK in mode 3 (unconditional)
* DBBEGIN in mode 1 (transaction begin)
* DBGET in mode 7 (calculated read)
* DBDELETE in mode 1 (delete)
* DBEND in mode 1 (transaction end)