Binding a batch program

Before a batch program can issue SQL statements, a DB2® plan must exist.

About this task

The owner of the plan or package must have all the privileges that are required to execute the SQL statements embedded in it.

You can specify the plan name to DB2 in one of the following ways:
  • In the DDITV02 input data set.
  • In subsystem member specification.
  • By default; the plan name is then the application load module name that is specified in DDITV02.

DB2 passes the plan name to the IMS™ attach package. If you do not specify a plan name in DDITV02, and a resource translation table (RTT) does not exist or the name is not in the RTT, DB2 uses the passed name as the plan name. If the name exists in the RTT, the name translates to the plan that is specified for the RTT.

Recommendation: Give the DB2 plan the same name as that of the application load module, which is the IMS attachment facility default. The plan name must be the same as the program name.