C Copyright © Oracle Corporation 1995. All Rights Reserved. C This subroutine is called by the program SQL$DIST_TRANS.FOR. It calls C SQL module procedures to delete an employee record from the west database, C an Rdb/VMS database. SUBROUTINE rdb_del_west (employee_id,in_tid) IMPLICIT NONE CHARACTER employee_id*5 C Declare the distributed TID and SQLCODE. INTEGER*4 in_tid(4),sqlcode C Declare the context structure. STRUCTURE /CONTXT_STRUCT/ INTEGER*4 VERSION INTEGER*4 TYPE INTEGER*4 LENGTH INTEGER*4 tid(4) INTEGER*4 END END STRUCTURE RECORD /CONTXT_STRUCT/ context C Initialize the context structure. context.version = 1 context.type = 1 context.length = 16 context.tid(1) = in_tid(1) context.tid(2) = in_tid(2) context.tid(3) = in_tid(3) context.tid(4) = in_tid(4) context.end = 0 C Prompt the user for input and accept the input. PRINT *, ' ' TYPE 100 100 FORMAT ('$',' Please enter the ID of the Employee: ') ACCEPT 120, employee_id 120 FORMAT (A) C Call the SQL module procedure START_WEST to start the transaction. CALL start_west(sqlcode,context) IF (SQLCODE .LT. 0) CALL sql$dist_trans_error(in_tid,sqlcode) C Call the SQL module procedure DELETE_WEST to delete the employee record. PRINT *, ' Deleting the row in 2pcwest database' CALL delete_west(sqlcode,employee_id,context) IF (SQLCODE .LT. 0) CALL sql$dist_trans_error(in_tid,sqlcode) IF (SQLCODE .EQ. 100) CALL sql$dist_trans_error(in_tid,sqlcode) RETURN END