INFORMIX
Informix Guide to SQL: Tutorial
Chapter 15: Creating and Using Triggers
Home Contents Index Master Index New Book

Tracing Triggered Actions

If a triggered action does not behave as you expect, place it in an SPL routine, and use the SPL TRACE statement to monitor its operation. Before starting the trace, you must direct the output to a file with the SET DEBUG FILE TO statement. The following example shows TRACE statements that have been added to the SPL routine items_pct. The SET DEBUG FILE TO statement directs the trace output to the file /usr/mydir/trig.trace. The TRACE ON statement begins tracing the statements and variables within the routine.

The following example shows sample trace output from the items_pct routine as it appears in the file /usr/mydir/trig.trace. The output reveals the values of routine variables, routine arguments, return values, and error codes.

For more information on using the TRACE statement to diagnose logic errors in SPL routine, see Chapter 14, "Creating and Using SPL Routines."




Informix Guide to SQL: Tutorial, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.