How to Access DB2 Stored Proc from IMS

This is now the capability of Zo/s. IMS batch come with a DB2 attachment facility.
Each IMS TM or batch region can be connected to only one DB2 subsystem at a time.

Steps required:

  • If you want to access DB2 stored proc from IMS.You need to do DB2 pre-compile and Bind the program.
  • The below stored procedure we can access it from IMS program


IMS application program must include logic to set the host variables prior to executing the CALL, and must include logic to handle any error conditions returned by the stored procedure.


Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.