C Copyright © Oracle Corporation 1995. All Rights Reserved. ******************************************************************************* * This Fortran Subroutine is called from the distributed transaction * application written in DEC C to add an employee to the Oracle CODASYL DBMS * database. * It expects to receive the distributed TID and the employee ID from the main * module. The employee's first and last names are copied from the common areas * xyz1 and xyz2. It uses a database called 2PCDBMS, which is a logical name for * the Oracle CODASYL DBMS PARTSS4 schema. ******************************************************************************* SUBROUTINE DBMS_INSERT (TID, ID) IMPLICIT NONE CHARACTER*8 VERB INTEGER*4 TID(4),ID,SYS$ABORT_TRANSW CHARACTER LAST_NAME*15,FIRST_NAME*11 COMMON /XYZ1/LAST_NAME COMMON /XYZ2/FIRST_NAME INTEGER*2 IOSB(4),RETRY,STATUS C INVOKE ( 1 SUBSCHEMA=PARTSS4, 2 SCHEMA=PARTS, 3 DATABASE=2PCDBMS, 4 STREAM=1) C Ready the database C Set the necessary information in the Uer Work Area for C new EMPLOYEE record C EMP_ID = ID EMP_LAST_NAME = LAST_NAME EMP_FIRST_NAME = FIRST_NAME EMP_PHONE = '8818734' EMP_LOC = '41343' RETRY = 0 C Ready the database C VERB = 'READY' C 110 READY (CONCURRENT, UPDATE, TRANSACTION=TID, ERR=910) C C Store the new EMPLOYEE record C 111 VERB = 'STORE' STORE (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