Using a stored procedure as an output
Using the database adapters, you can call stored procedures in output cards.
Type trees generated for stored procedures contain an item type for each input argument. Instead of a Row type, these type trees have a ProcedureCall type that represents the set of arguments passed to the stored procedure for each execution of that procedure. The DBProcedure type consists of a series of ProcedureCalls. The stored procedure is called once for each ProcedureCall in the DBProcedure output. This information is highlighted in the following example.
There are two ways to call stored procedures in output cards:
- In the output card dialog in the Map Designer, specify -PROC
procedure_name in the Using a database as a target.
or
setting. For more information, refer to - When overriding an output card using database adapter commands on the command line, use the -PROC adapter command and specify the stored procedure name. For more information, see the Resource Adapters documentation.
The values for each parameter are passed to the stored procedure with the stored procedure being called for each row of data.
The types of the parameters may be IN, OUT, or IN/OUT. However, there is no mechanism to return values from output parameters. Any values passed to an OUT parameter will be ignored.