Job DSNTIJRT

Job DSNTIJRT installs and configures Db2-supplied routines by executing the DSNTRIN program.

DSNTIJRT provides a configuration control statement for each Db2-supplied routine and the mode for processing those statements. The configuration control statement specifies the WLM environment, list of authorization IDs that are allowed to execute the routine, and optional package owner for the routine. DSNTRIN reads and validates those statements and uses them to create and customize routines and supporting objects.

Tip: Job DSNTIJRT issues certain GRANT statements, which causes an abend situation if it is run with the AUTH subsystem parameter set to NO. The NO setting of the AUTH subsystem parameter is not recommended because it disables all authorization checking in Db2 and disables the GRANT statement. For more information, see USE PROTECTION field (AUTH subsystem parameter).

Format

DSNTRIN accepts the following parameters:
DB2SSN
Identifies the Db2 subsystem on which to install and configure the Db2-supplied routines.
MODE
During SQL processing, DSNTRIN configures each routine with the WLM environment specified in the configuration control statement for that routine. Processing behavior depends on the DSNTRIN run mode, the Db2 catalog mode, and which objects already exist.
INSTALL
This is the normal operating mode. Use it when installing or migrating to Db2.
Create, bind, and grant access to the Db2-supplied routine according to the WLMENV and GRANTTO parameters of the configuration control statement. If the routine already exists, it is updated, if necessary, to use the WLM environment specified in the configuration control statement for that routine. If the package for a routine already exists, it is not bound again unless the DBRM has been updated or the package has been invalidated.

If the package for a routine already exists and the DBRM has not been updated and the package has not been invalidated, the package is rebound if its APPLCOMPAT level does not match the DB2OPT parameter RTN_PKG_APPLCOMPAT specified (VvvRrMmmm or V11R1).

Create, initialize, and grant access to any related objects required by the routine, such as a database or created global temporary table. If a supporting object is used by more than one routine, the object is created when one of those routines is first created.
REINSTALL
This mode behaves like INSTALL mode, except that existing Db2-supplied routines and created global temporary tables are dropped ahead of other processing. Existing related databases, table spaces, tables, and indexes are not dropped, except as discussed in the special notices section of the DSNTIJRT job prolog.
Use REINSTALL mode only if you have a specific need to drop and re-create all Db2-supplied routines. Before running the job, verify that each GRANTTO statement in DSNTIJRT specifies all users who are authorized to use that routine.
In particular, use this mode to create, bind, and grant access to the Db2-supplied routine according to the WLMENV and GRANTTO parameters of the configuration control statement. If the package for a routine already exists, it is not rebound unless the DBRM has been updated or the package has been invalidated. Create, initialize, and grant access to any related objects required by the routine, such as a database or created global temporary table. Existing routines and any related created global temporary tables are first dropped before they are re-created. Related databases are not dropped if they already exist, but they are created if they do not exist. If a supporting object is used by more than one routine, the object is created when one of those routines is first created. Drop processing of routines and related objects that do not exist is bypassed.
REINITIALIZE
This mode behaves like REINSTALL mode, except that existing databases, table spaces, tables, and indexes used by the Db2-supplied routines are also dropped ahead of other processing.
REINITIALIZE mode drops and reinitializes databases such as the XSR database that may contain information needed by Db2 for other processing. Therefore, use REINITIALIZE mode only when advised to do so by IBM® Support. Before running the job, verify that each GRANTTO statement in DSNTIJRT specifies all users who are authorized to use that routine.
In particular, use this mode to create, bind, and grant access to the Db2-supplied routine according to the WLMENV and GRANTTO parameters of the configuration control statement. If the package for a routine already exists, it is not rebound unless the DBRM has been updated or the package has been invalidated. Create, initialize, and grant access to any related objects required by the routine, such as a database or created global temporary table. Existing routines, existing related created global temporary tables, and existing related databases are first dropped before they are re-created. After each SQL statement, a COMMIT statement is issued. If a supporting object is used by more than one routine, the object is created when one of those routines is first created.
INSTALL-PREVIEW
Simulate INSTALL mode without updating the system. Generated JCL with embedded DDL and bind statements is outputted to the JCLOUT DD statement.
REINSTALL-PREVIEW
Simulate REINSTALL mode without updating the system. Generated JCL with embedded DDL and bind statements is outputted to the JCLOUT DD statement.
REINITIALIZE-PREVIEW
Simulate REINITIALIZE mode without updating the system. Generated JCL with embedded DDL and bind statements is outputted to the JCLOUT DD statement.
AUTHID
DSNTRIN uses this value as the CURRENT SQLID for creating and configuring most Db2-supplied routines. Start of changeIf DEFPKOWN is not specified,End of change DSNTRIN also uses this value as the default OWNER for binding packages for the Db2-supplied routines that do not have the PKGOWNER specified in the configuration control statement.

Start of changeWhen the AUTHID parameter is set to SYSINSTL, and you use the installation SYSADM authority or the installation SYSOPR authority to run this job for Db2 installation, Db2 identifies the Db2-supplied routines created or altered by DSNTRIN as system-defined in the SYSIBM.SYSROUTINES catalog table.End of change

SECDEFID
DSNTRIN uses this value as the CURRENT SQLID setting when creating and configuring Db2-supplied routines that are defined with the SECURITY DEFINER option.

The ID that you specify for SECDEFID must be an ID that can be used as a logon ID, because WLM uses the ID to execute Db2-supplied routines that are defined with SECURITY DEFINER.

Start of changeDEFPKOWNEnd of change
Start of change

Specifies the default OWNER for binding the package for a Db2-supplied routine when the PKOWNER parameter of the routine's configuration control statement is not specified. If DEPPKOWN is not specified, DSNTRIN uses the AUTHID value as the default package owner.

The DEFPKOWN parameter is required only when the AUTHID parameter is set to SYSINSTL. If the INSTALL PKG OWNER field on panel DSNTIPG is specified, the installation CLIST uses that value to set DEFPKOWN during the editing of DSNTIJRT. Otherwise, it uses the value specified in the ROUTINES CREATOR field on panel DSNTIPG. If SYSINSTL is specified on panel DSNTIPG, the installation CLIST adds a notice to the DSNTIJRT prolog to explain additional requirements.

Specify an installation system administrator ID if you use the installation SYSOPR authority to execute this job for Db2 installation. Specify an authorization ID that is granted the system DBADM and DATAACCESS authorities if you use the installation SYSOPR authority to execute this job for Db2 migration.

End of change

Input

DSNTRIN allocates the following DD statements for input:

DBRMLIB
Location of the DBRMs for Db2-supplied routines. This is typically the prefix.SDSNDBRM target library.
SYSUT1
Internal work file for the Db2 installation bind interface (DSNTRBI).
CFIGIN
Location of the configuration control statements for Db2-supplied routines.
DB2OPT
This required DD can contain the following optional parameters:
STOGROUP
Specifies a storage group to use for creating databases and table spaces that are used by the routines that are supplied with Db2. If this parameter is not specified, the default SYSDEFLT storage group is used.
INDEXSTOG
Specifies a storage group to use for creating indexes instead of the default SYSDEFLT storage group.
BP4K
Specifies an alternate 4-KB buffer pool for base table spaces that are created by DSNTRIN. The default 4-KB buffer pool is BP0.
BP8K
Specifies an alternate 8-KB buffer pool for base table spaces that are created by DSNTRIN. The default 8-KB buffer pool is BP8K0.
BP16K
Specifies an alternate 16-KB buffer pool for base table spaces that are created by DSNTRIN. The default 16-KB buffer pool is BP16K0.
BP32K
Specifies an alternate 32-KB buffer pool for base table spaces that are created by DSNTRIN. The default 32-KB buffer pool is BP32K.
LOBBP8K
Specifies an alternate 8-KB buffer pool for LOB table spaces that are created by DSNTRIN. The default 8-KB buffer pool is BP8K0.
LOBBP16K
Specifies an alternate 16-KB buffer pool for LOB table spaces that are created by DSNTRIN. The default 16-KB buffer pool is BP16K0.
LOBBP32K
Specifies an alternate 32-KB buffer pool for LOB table spaces that are created by DSNTRIN. The default 32-KB buffer pool is BP32K0.
IMS_SECURITY
The SECURITY type (Db2, DEFINER, or USER) for the Db2-supplied IMS routines. SECURITY Db2 is assumed when this keyword is not specified. Existing Db2 IMS routines are altered if needed to conform with the SECURITY type that is specified here.
MQ_SECURITY
The SECURITY type (Db2, DEFINER, or USER) for the Db2-supplied MQ routines. SECURITY Db2 is assumed when this keyword is not specified. Existing Db2 MQ routines are altered if needed to conform with the SECURITY type that is specified here.
SOAP_SECURITY
The SECURITY type (Db2, DEFINER, or USER) for the Db2-supplied web services/SOAP routines. SECURITY Db2 is assumed when this keyword is not specified. Existing Db2 SOAP routines are altered if needed to conform with the SECURITY type that is specified here.
Start of changeRTN_PKG_APPLCOMPATEnd of change
Start of changeThe APPLCOMPAT bind option (DEFAULT, Db2-function-level, V11R1) to be used for binding or rebinding packages for Db2-supplied routines.
DEFAULT
Specifies the following actions:
  • DSNTIJRT/DSNTRIN omit the APPLCOMPAT bind option from generated BIND statements for Db2-supplied routines with missing valid packages whose CONTOKEN matches that of the current DBRM.
  • DSNTIJRT/DSNTRIN bypass checking the APPLCOMPAT level of valid “current” packages for Db2-supplied routines to see if a REBIND is needed, where “current” means that the package CONTOKEN matches that of the current DBRM

Start of changeThe result of this option matches the behavior before APAR PH50704.End of change

Important: Start of change If RTN_PKG_APPLCOMPAT(DEFAULT) is specified or applied by default, the APPLCOMPAT subsystem parameter is used to bind the packages. If the APPLCOMPAT subsystem parameter is V10R1 and DSNTIJRT/DSNTRIN has to bind a down-level DSNADMEM package, the bind fails.End of change
Db2-function-level, V11R1
Db2-function-level is a VvvRrMmmm format value equivalent to or lower than the current function level of the Db2 subsystem.

Specifies the following actions.

  • DSNTIJRT/DSNTRIN add the APPLCOMPAT bind option, with the valid DB2OPT RTN_PKG_APPLCOMPAT setting, to generate BIND statements for Db2-supplied routines with missing valid packages whose CONTOKEN matches that of the current DBRM.
  • DSNTIJRT/DSNTRIN generate REBIND statements with the APPLCOMPAT option set to a valid DB2OPT RTN_PKG_APPLCOMPAT setting, for “current” packages for Db2-supplied routines because the APPLCOMPAT level of the valid "current" package does not agree with the DB2OPT RTN_PKG_APPLCOMPAT, where “current” means that the package CONTOKEN matches that of the current DBRM. For example, DSNTRIN generates the following REBIND statement with DB2OPT RTN_PKG_APPLCOMPAT=V12R1M509:
    REBIND PACKAGE(DSNADM.DSNADMCD.(V13R1)) 
           APPLCOMPAT(V12R1M509)
RTN_PKG_APPLCOMPAT(DEFAULT) is assumed if RTN_PKG_APPLCOMPAT is not specified.
Important: Start of change If RTN_PKG_APPLCOMPAT(DEFAULT) is specified or applied by default, the APPLCOMPAT subsystem parameter is used to bind the packages. If the APPLCOMPAT subsystem parameter is V10R1 and DSNTIJRT/DSNTRIN has to bind a down-level DSNADMEM package, the bind fails.End of change
End of change
Start of changeRTN_PKG_PLANMGMTEnd of change
Start of changeThe PLANMGMT bind option (DEFAULT, EXTENDED, BASIC, OFF) for rebinding packages for Db2-supplied routines.
DEFAULT
DSNTIJRT/DSNTRIN do not add the PLANMGMT rebind option to generated REBIND statements for packages for Db2-supplied routines.
EXTENDED, BASIC, OFF
DSNTIJRT and DSNTRIN add the PLANMGMT rebind option, with the valid DB2OPT RTN_PKG_PLANMGMT setting, to generated REBIND statements for packages for Db2-supplied routines.

For more information see PLANMGMT bind option.

RTN_PKG_PLANMGMT(DEFAULT) is assumed if RTN_PKG_PLANMGMT is not specified.

End of change
Note: DSNTRIN does not create or activate this storage group or any of these buffer pools.

Output

DSNTRIN allocates the following DD statements for output:

SYSPRINT
Destination for echo of configuration control statements that are read and for messages that are generated during processing. Each processed routine generates at least one status message.
SYSTSPRT
Internal message file for the Db2 installation bind interface (DSNTRBI).
CFIGOUT
Destination for configuration control statements that are read by DSNTRIN. This output is useful for diagnostic purposes when DSNTRIN reports an error in a configuration control statement.
SQLOUT
Destination for DDL statements that are generated and processed by DSNTRIN. These statements are useful for diagnostic purposes.
BINDOUT
Destination for bind statements that are generated and processed by DSNTRIN. These statements are useful for diagnostic purposes.
JCLOUT
Destination for a generated sample job that is generated when one of the PREVIEW modes is specified. The job contains steps that process inline DDL and bind statements that are needed to install and configure missing, down-level, or incorrectly configured Db2-supplied routines. This DD is required if you specify a PREVIEW mode.
Example of executing DSNTRIN in INSTALL mode: Start of change

//DSNTRIN EXEC PGM=DSNTRIN,COND=(4,LT),
//         PARM=('DB2SSN(DSN) MODE(INSTALL)',
//         ' AUTHID(ADMF001) SECDEFID(ADMF002)',
//         ' DEFPKOWN(SYSADM)')

//DBRMLIB  DD DISP=SHR,DSN=DSN!!0.SDSNDBRM
//SYSUT1   DD UNIT=SYSDA,SPACE=(27930,(10,5)),
//            DCB=(RECFM=FB,LRECL=133)
//SYSPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=133)
//SYSTSPRT DD SYSOUT=*
//CFIGOUT  DD SYSOUT=*
//SQLOUT   DD SYSOUT=*
//BINDOUT  DD SYSOUT=*
//DB2OPT   DD *
 STOGROUP(DB2_ROUTINES_GROUP)
 INDEXSTOG(DB2_INDEX_GROUP)
 BP4K(BP0)
 BP8K(BP8K0)
 BP16K(BP16K0)
 BP32K(BP32K) 
 LOBBP8K(BP8K0)
 LOBBP16K(BP16K0)
 LOBBP32K(BP32K0) 
 IMS_SECURITY(DB2)
 MQ_SECURITY(DB2)
 SOAP_SECURITY(DB2)
 RTN_PKG_APPLCOMPAT(DEFAULT) 
 RTN_PKG_PLANMGMT(DEFAULT)
/*
//CFIGIN   DD *
  ...
SYSPROC.DSNWSPM 
WLMENV(DSNWLM_NUMTCB1)
GRANTTO(PUBLIC) 

SYSPROC.DSNWZP
WLMENV(DSNWLM_NUMTCB1)
GRANTTO(PUBLIC)
  ...
//*
End of change
Example of executing DSNTRIN in INSTALL-PREVIEW mode: Start of change

//DSNTRIN EXEC PGM=DSNTRIN,COND=(4,LT),
//         PARM=('DB2SSN(DSN) MODE(INSTALL-PREVIEW)',
//         ' AUTHID(ADMF001) SECDEFID(ADMF002)',
//         ' DEFPKOWN(SYSADM)')

//DBRMLIB  DD DISP=SHR,DSN=DSN!!0.SDSNDBRM
//SYSUT1   DD UNIT=SYSDA,SPACE=(27930,(10,5)),
//            DCB=(RECFM=FB,LRECL=133)
//SYSPRINT DD SYSOUT=*,DCB=(RECFM=FB,LRECL=133)
//SYSTSPRT DD SYSOUT=*
//CFIGOUT  DD SYSOUT=*
//SQLOUT   DD SYSOUT=*
//BINDOUT  DD SYSOUT=*
//JCLOUT   DD DSN=USER.JCLLIB(DB2INST),DISP=SHR  
//DB2OPT   DD *
 STOGROUP(DB2_ROUTINES_GROUP)
 INDEXSTOG(DB2_INDEX_GROUP)
 BP4K(BP0)
 BP8K(BP8K0)
 BP16K(BP16K0)
 BP32K(BP32K) 
 LOBBP8K(BP8K0)
 LOBBP16K(BP16K0)
 LOBBP32K(BP32K0)
 IMS_SECURITY(DB2)
 MQ_SECURITY(DB2)
 SOAP_SECURITY(DB2)
 RTN_PKG_APPLCOMPAT(DEFAULT) 
 RTN_PKG_PLANMGMT(DEFAULT)
/*
//CFIGIN   DD *
  ...
SYSPROC.DSNWSPM 
WLMENV(DSNWLM_NUMTCB1)
GRANTTO(PUBLIC) 

SYSPROC.DSNWZP
WLMENV(DSNWLM_NUMTCB1)
GRANTTO(PUBLIC)
  ...
//*
End of change