This link provides complete info on DB2 stored procedures. Here’s syntax to call stored procedure in COBOL.
These are dynamic. Driven by events or by the clock, they start a stored procedure. Triggers are tied to specific tables and actions; they are invoked automatically whenever the table is the target of an UPDATE, DELETE, or INSERT statement.
These are passive — they must be initiated by a trigger or explicitly requested by a user or process. Stored procedures are not linked to specific tables; they may be invoked manually. Stored procedures allow an application program to be run in two parts: one on the client and one on the server. Also, stored procedures may be requested from a client application and executed from remote server workstations.
Some experts believe that commonly used procedures should be stored with the database rather than with each application. Benefits include improved application reliability, lower development and maintenance costs, and reduced network traffic. In addition, they say, it is easier to enforce business rules from a single server than on many clients.
How to call Stored Procedure in COBOL
You need to create a Stored Procedure and Store it in the Database before you use it.