Accessing the correct Db2 program library

If you do not place prefix.SDSNLOAD in the LNKLSTxx member of SYS1.PARMLIB, you must provide JOBLIB or STEPLIB statements for it in certain types of programs and procedures.

Before you begin

Remember: Start of changeIf you copy Db2 library data sets from one system another, such as for installing a related test or production subsystem, ensure that you copy all of the Db2 library data sets to the same location. For example, if you copy the SDNSLOAD data set from one system to another but omit the DBRMLIB data set, the resulting mismatch can cause job DSNTIJRT to fail with SQLCODE -812.End of change

About this task

The installation and migration jobs that are provided with Db2 12 already contain the necessary JOBLIB or STEPLIB statements. In addition, the startup procedures that Db2 provides include STEPLIB statements for their respective program libraries, prefix.SDSNLOAD, and prefix.SDSNEXIT.

Procedure

To access the correct program library:

Provide STEPLIB or JOBLIB statements for the following types of programs and procedures if you do not place prefix.SDSNLOAD in the LNKLSTxx member of SYS1.PARMLIB.
  • TSO or batch jobs that access Db2 services require JOBLIB or STEPLIB statements for prefix.SDSNLOAD. These jobs include TSO logon procedures and batch jobs that access the DSN command and subcommands, the Db2 precompiler, and Db2 utilities.
  • IMS control, message, and batch processing jobs also require JOBLIB or STEPLIB statements for prefix.SDSNLOAD. You must specify the Db2 load library in the startup procedure for each IMS region (IMS control, message processing program (MPP), batch message processing (BMP), and Fast Path region) that can communicate with Db2. You can do this in two ways:
    • If all the data sets that the JOBLIB or STEPLIB statement refers to for an IMS region are APF-authorized, add the DD statement for prefix.SDSNLOAD to the JOBLIB or STEPLIB statement. If you are using the DYNAM option of COBOL, the IMS RESLIB DD statement must precede the reference to prefix.SDSNLOAD in the JOBLIB or STEPLIB statement.
    • If any of the data sets that the JOBLIB or STEPLIB statement refers to for the IMS region are not APF-authorized, add the DFSESL DD statement for prefix.SDSNLOAD. All libraries that are specified on the DFSESL DD statement must be APF-authorized. The DFSESL DD statement is not required by the Db2 DL/I batch support. IMS requires that an IMS RESLIB DD statement also be referred to by the DFSESL DD statement, as in the following example:
      //DFSESL     DD      DSN=ims_reslib,DISP=SHR
      //           DD      DSN=prefix.SDSNLOAD,DISP=SHR
  • CICS® procedures, including the CICS initialization JCL, also need to include Db2 libraries.