How trigger programs work

Start of changeWhen a user or application issues a change or read operation on a database file that has an associated trigger, the operation calls the appropriate trigger program or programs.End of change

The change or read operation passes two parameters to the trigger program, as described in the following table.

Parameter Description Input or output Type
1 Trigger buffer, which contains the information about the current change operation that is calling this trigger program. Input CHAR(*)
2 Trigger buffer length. Input BINARY(4)

From these inputs, the trigger program can refer to a copy of the original or the new records. You must code the trigger program so that it accepts these parameters.

Related concepts
Trigger buffer sections