Skip to content

CMNDB2TR

Program CMNDB2TR runs at promote, demote, install, and backout to maintain the firing order of existing triggers when a new trigger is added or an existing trigger is changed by utility program CMNDB2DD.

This program reads a file created by utility program CMNDB2DD that lists CREATE TRIGGER definitions have been executed. Program CMNDB2TR queries SYSIBM.SYSTRIGGERS to see if multiple triggers have been defined for the same table/ event/time combination. If multiple triggers are defined, then triggers with CMNFIRE#nn coded on the COMMENT ON field are dropped and recreated in the nn sort sequence. All other triggers are then recreated in the original CREATEDTS order.

CREATE TRIGGER SQL executed by CMNDB2TR is built from the Db2 catalog entries.

This table shows the skeletons that include program CMNDB2TR and where those skeletons are used.

Skeleton ...embedded in skeletons Skeleton Description
CMN$$PSQ CMN$$PRM Perform promotion or demotion to local sites.
CMNIMPRM IMS Option: Perform promotion or demotion to local sites.
CMN$$RSQ CMNRPICR IMS Option: Perform remote promotion or demotion.
CMNRPMCR Perform promotion or demotion to remote sites.
CMN$$SQL CMN21 Job to perform Db2 binds and/or DDL processing for installation of packages into production libraries and Db2 catalogs.
CMN49 Job to perform Db2 binds and/or DDL processing for backout of packages from production libraries and Db2 catalogs.

Return Codes and Messages

Return Code Description
00 Success
04 Warnings Issued
08 SQL errors
12 Parameter errors
16 Other unrecoverable errors