Previous Topic: Link Editing Database ProceduresNext Topic: Resetting the Error-Status Indicator


Executing Database Procedures

When a DML command is issued at application run time, all BEFORE procedures are executed in the order specified in the schema. A BEFORE procedure can prevent execution of the DML command in either of the following ways:

The DML command is not executed if either of the above conditions exists when all BEFORE procedures have been completed. If the cancel indicator in the procedure control block is reset to a nonzero value, control passes directly to the AFTER procedures. If the error-status indicator in the application control block is reset to a nonzero value, control passes directly to the ON-ERROR procedures.

Note: To prevent execution of a FINISH DML command, a BEFORE FINISH procedure must reset the error-status indicator to a nonzero value. You cannot use the cancel indicator for this purpose.