Precautions to take when coding trigger programs

 

Trigger programs can be very powerful. But take caution when coding trigger programs.

Be careful when designing trigger programs that access a system resource, such as a tape drive. For instance, a trigger program that copies record changes to tape media can be useful, but the program itself cannot detect if the tape drive is ready or if it contains the correct tape. You must take these kinds of resource issues into considerations when designing trigger programs.

In addition, use read triggers with extreme caution. Using a read trigger causes a trigger to be called for every record that is read. During a query, this means that triggers can be called many times as records are processed multiple times by the query. This can impact system performance.

 

Parent topic:

Other important information about working with trigger programs