<arc:set attr="db.driver" value="cdata.jdbc.mysql.MySQLDriver" />
<arc:set attr="db.conn" value="jdbc:cdata:mysql:server=localhost;port=3306;database=sakila;user=root;password=Password123;"/>
<arc:set attr="db.sp" value="film_in_stock"/>
<arc:set attr="db.paramname#1" value="p_film_id"/>
<arc:set attr="db.paramvalue#1" value="3"/>
<arc:set attr="db.paramname#2" value="p_store_id"/>
<arc:set attr="db.paramvalue#2" value="7"/>
<arc:call op="dbCall" in="db" out="results" >
<!-- optional logging step to see the output of the SP in the application log -->
<arc:set attr="_log.info" value="RESULTS = [results.*]" />
<!-- adding the result data from the stored procedure to the file that is being created and pushed out -->
<arc:set attr="output.data" value="[results.*]" />
<!-- setting the filename -->
<arc:set attr="output.filename" value="storedProcResults.txt" />
</arc:call>
<arc:push item="output" />