Creating and calling SQL Stored Procedures
M3 Web Services also supports the calling of Stored Procedures. Store Procedures is considered to be an advanced topic, and differs from database to database, therefore, it is difficult to document. If you want to use Stored Procedures, it will be necessary to consult the documentation for your database and JDBC driver.
However, the basic SQL syntax for calling a stored procedure through JDBC is as follows:
{call MY_PROCEDURE}
Below, you find a partial example of creating and calling a stored procedure on i5/iSeries which lists an M3 customer table as in our other examples. First, the stored procedure is created.
Note: There are many ways to create the stored procedure,
and there are IBM Redbooks and manuals that cover this in more detail.