How to Associate a Trigger with a File

Once you have written your trigger subroutine, you must associate it with the appropriate Reality file using the CREATE-TRIGGER command. You must specify the file, the trigger subroutine and the type of trigger required (PRE-WRITE, POST-WRITE, PRE-DELETE or POST-DELETE). A trigger can be associated with a file data section or a file dictionary. Note that the trigger subroutine must be cataloged in the master dictionary of the account containing the file.

The DELETE-TRIGGER command allows you to remove trigger associations. In this case you need only specify the file name and the trigger type.

LIST-TRIGGERS lists the triggers associated with a file.

Notes:

See Also

Embedded Basic Subroutines
How to Write an Embedded Basic Subroutine
Embedded Basic Examples
Debugging Embedded Basic Subroutines
Triggers Dos and Don’ts

Go to top button