---
title: "How to Call Stored Procedure in COBOL"
description: "This link provides complete info on DB2 stored procedures . Here's syntax to call stored procedure in COBOL. Triggers  . These are dynamic. Driven by events or by the clock, they start a stored proced..."
url: https://srinimf.com/2013/02/19/stored_procedure_cobol/
date: 2013-02-19
modified: 2026-10-09
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2013/02/pexels-photo-6373446.jpeg?fit=1880%2C1253&ssl=1
categories: ["DB2"]
tags: ["DB2 Stored procedure", "DB2 Tips and Solutions"]
type: post
lang: en
---

# How to Call Stored Procedure in COBOL

This [link](http://mullinsconsultinginc.com/Stored%20Procedure%20Guidelines%20for%20DB2.pdf)provides complete info on [DB2 stored procedures](https://srinimf.com/2010/12/23/db2-stored-procedurestriggers/). Here’s syntax to call stored procedure in COBOL.

## **Triggers** 

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.

## **Stored procedures** 

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**

Exec SQL

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

End-Exec

You need to create a Stored Procedure and Store it in the Database before you use it.

Related Posts

- [How to Register Stored Procedures in a DB2 Catalog Table](https://srinimf.com/2023/04/03/how-to-register-stored-procedures-in-a-db2-catalog-table/)DateApril 3, 2023
- [How to Understand Triggers in DB2 SQL Context](https://srinimf.com/2015/09/17/4-types-of-triggers-in-db2/)DateSeptember 17, 2015
- [How to Invoke a DB2 Stored Procedure in Mainframe](https://srinimf.com/2013/09/03/db2-how-to-invoke-a-procedure-in-mainframe/)DateSeptember 3, 2013

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2013%2F02%2F19%2Fstored_procedure_cobol%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2013%2F02%2Fpexels-photo-6373446.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=How%20to%20Call%20Stored%20Procedure%20in%20COBOL)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2013/02/19/stored_procedure_cobol/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2013/02/19/stored_procedure_cobol/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2013/02/19/stored_procedure_cobol/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2013/02/19/stored_procedure_cobol/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20How%20to%20Call%20Stored%20Procedure%20in%20COBOL&body=https%3A%2F%2Fsrinimf.com%2F2013%2F02%2F19%2Fstored_procedure_cobol%2F&share=email)
-

### Like this:

Like Loading…
