Skip to content

CMNDB2DQ

Program CMNDB2DQ runs at promote, demote, install, and backout. It dynamically calls the Db2 precompiler to extract the SQL required to define an object to Db2, removing any procedural code within the CREATE object definition. It can be used for any SQL component type, but program CMNDB2DQ is required when processing SQL language stored procedures.

The CREATE SQL extracted by this program is written to a file that is passed to utility program CMNDB2DD where the SQL is executed to register the Db2 objects in Db2 catalogs.

This table shows the skeletons that include program CMNDB2DQ 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 Used to perform db2 binds and/or ddl processing for installation of packages into production libraries and db2 catalogs.
CMN49 Used to perform db2 binds and/or ddl processing for backout of packages from production libraries and db2 catalogs.

Keyword Control Statements

This table describes the keyword options that control the behavior of program CMNDB2DQ.

Keyword Description
NOTFOUNDRC= Return code set if the requested SQL component (MBR=) is not found in the library concatenation at ddname SQLIN. Valid values: 0 to 99 Default: 8 Comment: Set to 0 for demotion and backout functions.
MBR= Name of SQL component to be processed. The number of MBR control statements is not limited.

Return Codes and Messages

Program CMNDB2DQ calls the Db2 precompiler. The return codes from the precompiler are passed through as CMNDB2DQ return codes.