Yes, we can access Db2 stored proc from CICS.
CICS transaction manager comes with DB2 attachment facility.This is the reason CICS can access DB2 stored procedure from CICS.
Every CICS region can access only one DB2 sub-system.
- Stored procedures are accessed from CICS programs by issuing SQL CALL statements
- A CALL statement that references a stored procedure must be bracketed between EXEC SQL and the statement terminator appropriate for the host language
- For COBOL programs, the statement terminator is END-EXEC
Note:The CICS 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. These two logic components are no different than what is required of a batch program written in the same host language.
Refer more in the link from IBM.
- DB2-Calling Cobol,C,Java Programs from Stored Proc (srinimf.com)
- Db2-How to Access CICS from Db2 Stored Proc? (srinimf.com)
- DB2 9.7 SQL syntax, what am I doing wrong? (stackoverflow.com)