Invoking a chained stored procedures in the Database Inbound protocol’s Read Success/Failure Action or Database Outbound protocol’s Action
A chained stored procedure invocation is supported in the Database Inbound protocol’s Read Success/Failure action and Database Outbound protocol action.
When invoking more than one stored procedure, a semicolon (;) is used to separate the stored procedures.
For example:
{? = call sptest(inValue1, inValue2, outPara1 OUT, outPara2 OUT)} ; {call sptest(inValue1, inValue2, outPara1 OUT, outPara2 OUT)};
{call sptest_simple}
In a chained stored procedure invocation, the procedure name should not be duplicated.
Two types of place holders are supported in the chained stored procedure:
- The database Schema field place holder
- The
OUT
parameter place holderWith the
OUT
parameter place holder, you can use the returnedOUT
parameter value of the previous stored procedure. This value is used as the input value of the latter stored procedure.
Usage is:
<procName.parameterName>
For example:
{?=call sp1(inValue, outPara1 OUT, outPara2 OUT)}; {call sp2(outPara1 OUT)};{call sp3(<sp1._CLRC_>,
<sp1.outPara1>, <sp1.outPara2>, <sp2.outPara1>) }
In this example, the
sp3
stored procedure uses the
sp1
output value
<sp1._CLRC_>
,
<sp1.outPara1>
,
<sp1.outPara2>
and
sp2
output value
<sp2.outPara1>
as its input value.