C Copyright © Oracle Corporation 1995. All Rights Reserved. ******************************************************************************* * This Fortran Subroutine is called from the distributed transaction * application written in DEC C to delete an employee from the Oracle CODASYL * DBMS database. * It expects to receive the distributed TID and the employee ID from main * program. It uses a database called 2PCDBMS, which is a logical name for * the Oracle CODASYL DBMS PARTSS4 schema. ******************************************************************************* SUBROUTINE DBMS_DELETE (TID, ID) IMPLICIT NONE CHARACTER*8 VERB INTEGER*4 TID(4),ID,RETRY C INVOKE ( 1 SUBSCHEMA=PARTSS4, 2 SCHEMA=PARTS, 3 DATABASE=2PCDBMS, 4 STREAM=1) C Ready the database EMP_ID = ID VERB = 'READY' 110 READY (CONCURRENT, UPDATE, TRANSACTION=TID, ERR=910) VERB = 'FETCH' FETCH (FIRST, RECORD=EMPLOYEE, SET=ALL_EMPLOYEES, 1 USING=(EMP_ID), ERR=910, END=999) VERB = 'ERASE' ERASE (RECORD=EMPLOYEE,ERR=910) GOTO 999 910 PRINT *, ' ERROR ON ', VERB, ' VERB ON STREAM 1' CALL DBM$SIGNAL_STREAM (DBM$UWA) 999 PRINT *, ' ' RETURN END