Skip to content

Customize Skeletons for Db2

You must customize a skeleton to set the DBRM library type for the Db2 precompiler, and you may want to modify skeletons that execute plan lookup program CMNDB2PL.

Set DBRM Library Type for Db2 Precompile

Modify skeleton CMN$$VAR to set the library type for DBRM created by the Db2 Precompiler in skeleton CMN$$PDB.

  1. Make sure you are working in a CUSTOM SKELS library and not the delivered skeleton library.

  2. Edit member CMN$$VAR.

  3. Find "SET PREFERRED LIBTYPES".

  4. Read the instructions under that heading and choose a method to set the library type for DBRM in one or more applications.

  5. Uncomment the provided code, or code your own solution to set variable DBRMLTP.

Modify Plan Lookup Parameters In Skeletons

Plan lookup program CMNDB2PL is included in seven skeletons. The function of program CMNDB2PL is controlled by keyword parameters input through the SYSIN ddname. The values of these keywords in the delivered skeletons will be suitable for many user sites. However, there is an interaction between these keyword options and the definition of logical subsystems in the Db2 Option.

See CMNDB2PL - BIND Utility for detailed descriptions of each CMNDB2PL keyword option. Modify the skeletons below if you need to change the values for these options:

Skeleton Purpose
CMN$$PRB Bind Db2 plans and packages for promotion/ demotion at local sites.
CMN$$PB2 Secondary binding at local sites.
CMN$$RPB Bind Db2 plans and packages for promotion/ demotion at remote sites.
CMN$$RB2 Secondary binding at remote sites.
CMN$$SPB Bind Db2 plans and packages for promotion/demotion using shadow promotion libraries at the development ChangeMan ZMF instance.
CMN$$SB2 Secondary binding using shadow promotion libraries.
CMN21 Bind Db2 plans and packages for install at production ChangeMan ZMF instances.
CMN$$IB2 Secondary binding for install in production.
CMN32 Bind Db2 plans and packages for baseline ripple at development ChangeMan ZMF instances.
CMN$$BB2 Secondary binding for baseline ripple.
CMN49 Bind Db2 plans and packages for backout at production ChangeMan ZMF instances.
CMN56 Bind Db2 plans and packages for backout (reverse baseline ripple) at development ChangeMan ZMF instances.

SQL Processing In Skeletons

Modify the skeletons below if you need to change the way SQL is processed - observe the comments in each. Refer also to Stored Procedure Utilities:

Skeleton Purpose
CMN$$PSQ Local promote/demote - This routine presents SQL/DDL components to local Db2.
CMN$$RSQ Remote promote / demote - This routine presents SQL/DDL components to remote Db2.
CMN$$SQL Install/backout - This routine processes install and backout for SQL/DDL components to Db2.

Bind Service Processing In Skeletons

Modify the skeletons below if you need to change the way SQL is processed - observe the comments in each. Refer also to Bind Service Support for more information.

Skeleton Purpose
CMN$$BSV Install/backout - This routine templates BIND SERVICE command parameters as well as related GRANT DDL. The templated bind commands are processed by IKJEFT01 and the templated GRANT DDL is presented to Db2.
CMN$$PSV The same as CMN$$BSV but used for local promote/demote.
CMN$$RSV The same as CMN$$BSV but used or remote promote/demote.