call a native stored procedure from a cobol program

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
User avatar
Akshya Chopra
Registered Member
Posts: 77
Joined: Mon May 20, 2013 11:32 pm
Algeria

call a native stored procedure from a cobol program

Post by Akshya Chopra »

Hi,

Can we call a native stored procedure from a cobol program and viceversa. If yes can you share me some documents or link related to it?
User avatar
Akshya Chopra
Registered Member
Posts: 77
Joined: Mon May 20, 2013 11:32 pm
Algeria

Re: call a native stored procedure from a cobol program

Post by Akshya Chopra »

Hi, could anybody help on this please?
User avatar
zum13
Registered Member
Posts: 85
Joined: Thu May 04, 2023 12:58 am

Re: call a native stored procedure from a cobol program

Post by zum13 »

Hello.

Stored procedures are intended to be callable from any program irrespective of which language the procedure has been written in. It does not matter if the procedure is in the same language as the calling program or not, the important thing is that the parameters specified when the procedure was defined match the ones that you are passing to it in your "CALL" statement.

The same thing applies to native procedures as well. If you take a look at the syntax for the external and native variations of the "CREATE PROCEDURE" statement, the part which defines the parameters to the procedure is the same in both. The main difference you will see is that the native variant has the coding as part of the statement.

In addition to the usual product manuals at https://www.ibm.com/docs/en/db2-for-zos/13 , there's an old circa V9 Redbook on the subject of stored procedures here: https://www.redbooks.ibm.com/abstracts/sg247604.html
User avatar
Akshya Chopra
Registered Member
Posts: 77
Joined: Mon May 20, 2013 11:32 pm
Algeria

Re: call a native stored procedure from a cobol program

Post by Akshya Chopra »

Thanks zum13. Redbooks has got a lot of details. How do you search such manuals?
User avatar
zum13
Registered Member
Posts: 85
Joined: Thu May 04, 2023 12:58 am

Re: call a native stored procedure from a cobol program

Post by zum13 »

There's a search page at https://www.redbooks.ibm.com/ that can be accessed by clicking the magnifying glass icon at the top left of the page which will allow you to locate manuals in the catalogue. For searching within a manual, that will depend on which tool you're using to view the PDFs, but Ctrl-F is usually a good bet, plus there's usually an index and table of contents.

For the online documentation site, https://www.ibm.com/docs/en/ has a search tool in the banner at the top of the page. Once you're actually in the documentation, there's a search facility in the tool bar.

And if all else fails, there's always Google!
User avatar
CeltRhync
New Member
Posts: 1
Joined: Sat Feb 17, 2024 1:10 pm

Re: call a native stored procedure from a cobol program

Post by CeltRhync »

Have you tried using the search page on the Redbooks website or the search tool on the IBM online documentation site to find the relevant manuals for stored procedures in your context?
:)
User avatar
Akshya Chopra
Registered Member
Posts: 77
Joined: Mon May 20, 2013 11:32 pm
Algeria

Re: call a native stored procedure from a cobol program

Post by Akshya Chopra »

CeltRhync wrote: Sun Feb 18, 2024 4:32 pm Have you tried using the search page on the Redbooks website or the search tool on the IBM online documentation site to find the relevant manuals for stored procedures in your context?
Yes, I did.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”