CONNX Data Integration Suite 14.8.0 | Concepts | Advanced Features of CONNX | CONNX and DB2 Advanced Features | Importing Stored Procedures
 
Importing Stored Procedures
CONNX automatically imports stored procedures during the CONNX table/view import process.
CONNX can import stored procedures from any DRDA-compliant target, including Db2 UDB 5.x and 6.x for Windows/Linux, Db2/400, and Db2 for z/OS. On supported platforms, CONNX can import stored procedures with input, output, and input/output parameters, as well as stored procedures which return multiple result sets. Stored procedures can be implemented in a variety of high-level languages, including Java, C/C++, Cobol, RPG, and Db2/400 Command Language. The CONNX user does not need to know the implementation details. As long as a stored procedure is defined to the target Db2 system metadata catalog via the Create Procedure SQL statement, CONNX can find and import it.
Once imported to the CDD, the Db2 stored procedure properties are displayed in a tabbed dialog format similar to imported tables or views.
An ODBC application can invoke a Db2 stored procedure via CONNX with the following syntax:
?={call rdbname.schema.procname(?,?,...?)}
or
?={call schema.procname(?,?,...?)}
or
?={call procname(?,?,...?)}
where the left question mark (?) is an optional return parameter, and the parameters within parentheses are input/output parameters defined by the ODBC 2.x/3.x SQLBindParameter API calls. Db2 stored procedure result set attributes are not imported; these attributes are determined at runtime.