what is the shell command for executing stored procedure in DB2 OS400.
CALLPRC PRC(SPNAME) PARM('','',5,'','') RTNVAL()
what is this one??
what is the shell command for executing stored procedure in DB2 OS400.
CALLPRC PRC(SPNAME) PARM('','',5,'','') RTNVAL()
what is this one??
Assuming you've got a stored procedure called SPNAME
, here's how you'd run it through SQL on DB2:
CALL SPNAME('', '', 5, '', '');
This of course assumes that you've already got a database connection through which you can execute SQL statements.
A couple of things you'll probably have to worry about:
CALL LIBNAME.SPNAME(...)
. Or you can use SET PATH=LIBNAME
to provide a list of libraries to search.This link explains how to execute a stored procedure in PHP using ODBC.