How to Call Stored Procedure in COBOL ZO/s?

This link provides complte info on DB2 stored procedures.

Triggers 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.
 
Stored procedures 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?

Exec SQL

CALL Stored-proc-name(:inp1,:inp2)

End-Exec

We need to create Stored Procedure and Store it in the Database.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.