Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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:
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
FILE | File | Qualified object name | Required, Positional 1 |
Qualifier 1: File | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB | ||
TRG | Trigger | Character value, *ALL | Required, Positional 2 |
TRGLIB | Trigger library | Name, *ALL, *CURLIB | Optional |
STATE | Trigger state | *SAME, *ENABLED, *DISABLED | Optional |
Top |
Specifies the file for which a trigger is to be changed. The file must be a physical file.
This is a required parameter.
Qualifier 1: File
Qualifier 2: Library
Top |
Specifies the name of the trigger to be changed.
Note: When *ALL is specified, all triggers defined for the file will be changed. Any value specified for the Trigger library (TRGLIB) parameter will be ignored.
Note: The case is preserved when lowercase characters are specified.
Top |
Specifies the library for the trigger to be changed.
Note: The special value *CURLIB is the value of the job running when the trigger is changed.
Top |
Specifies the state to which the trigger is to be changed. You can use this parameter to temporarily stop a trigger from being called (disable), or to make a trigger that was previously disabled called again during I/O operations (enable).
Top |
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)
Top |
Top |