/* Copyright © Oracle Corporation 1995. All Rights Reserved. */ /***************************************************************************** * This routine delete an employee from the EAST database. The distributed * context structure is the parameter this routine expects. * ******************************************************************************/ #include ctype #include #include #include #include EXEC SQL INCLUDE SQLCA; EXEC SQL DECLARE east ALIAS FOR FILENAME 2pceast; struct context_struct { long version; long type; long length; long distributed_tid[4]; long end; }; extern char emp_id[6]; long sqlcode; void sql$dist_trans_error (struct context_struct *context); void rdb_del_east(struct context_struct *context) { struct context_struct local_context; local_context = *context; EXEC SQL USING CONTEXT :local_context Delete FROM east.EMPLOYEES E WHERE E.EMPLOYEE_ID = :emp_id; if (SQLCA.SQLCODE != 0) sql$dist_trans_error(&local_context); return; }