Creating trigger programs

You can create and work with a program that contains a set of trigger actions.

To add a trigger to a database file, follow these steps:

  1. Supply a trigger program.
    You can write a trigger program in a high-level language (HLL), Structured Query Language (SQL), or control language (CL).
  2. Use one of the following methods to add the trigger:
    • The Add Physical File Trigger (ADDPFTRG) command. You must specify your trigger program in the trigger program (PGM) parameter on the command.
    • The CREATE TRIGGER SQL statement.