Page 1 of 1

call a native stored procedure from a cobol program

Posted: Thu Jan 11, 2024 9:13 pm
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?

Re: call a native stored procedure from a cobol program

Posted: Mon Jan 22, 2024 11:21 am
by Akshya Chopra
Hi, could anybody help on this please?

Re: call a native stored procedure from a cobol program

Posted: Tue Feb 13, 2024 4:59 am
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

Re: call a native stored procedure from a cobol program

Posted: Tue Feb 13, 2024 10:14 am
by Akshya Chopra
Thanks zum13. Redbooks has got a lot of details. How do you search such manuals?

Re: call a native stored procedure from a cobol program

Posted: Thu Feb 15, 2024 10:57 pm
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!

Re: call a native stored procedure from a cobol program

Posted: Sun Feb 18, 2024 4:32 pm
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?

Re: call a native stored procedure from a cobol program

Posted: Wed Feb 21, 2024 7:17 pm
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.