Test the creation of the DB2 stored procedure and use get diagnostics to return the affected rows:
Create a file in. IO in the current directory
--In. IoCreate ProcedureProc1 (Out rowsInteger) Language SQLBeginUpdateTb1SetName=Name; get diagnostics rows=Row_count;End@
Run:
--Create procedure where-TD is used to specify the terminator; and @-V is used to specify the file to be executed by the command-F in the output fileDB2-TD @-VFIn. Io--Execute procedure \ is an escape character. You can also use DB2 "Call proc1 (?) "? Number is the output parameterDB2 call proc1 \(? \)
Refer:
Get diagnostics use: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp? Topic =/com.ibm.db2.udb.doc/admin/r0005647.htm
Create procedure Syntax: http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp? Topic =/com.ibm.db2.udb.doc/admin/r0005647.htm