CL Command Reference - CHGPFTRG

CL Command List > CHGPFTRG Reference

Description:

The Change Physical File Trigger (CHGPFTRG) command changes the state of one or all triggers for a file. The triggers have been defined with either the SQL CREATE TRIGGER or the Add Physical File Trigger (ADDPFTRG) command.

The state of a trigger can be changed to disabled (stopped from being called during I/O operations) or, if it has been disabled, to enabled (called during I/O operations again). The alternative to changing the state of the trigger is to remove it when you do not want it to be called, and add it again when you need it.

Restrictions:

. You must have object management (*OBJMGT) or object alter (*OBJALTER) authority to the physical file.

. You must have execute (*EXECUTE) authority to the library that contains the physical file.


Examples:

CHGPFTRG FILE(ADMN/PERSONNEL) TRG(*ALL) STATE(*DISABLED)

This command disables all triggers for the PERSONNEL file in the ADMN library.

The following command causes all triggers to be called again:

CHGPFTRG FILE(ADMN/PERSONNEL) TRG(*ALL) STATE(*ENABLED)