call a native stored procedure from a cobol program
- Akshya Chopra
- Registered Member
- Posts: 80
- Joined: Mon May 20, 2013 11:32 pm
call a native stored procedure from a cobol program
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?
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?
- Akshya Chopra
- Registered Member
- Posts: 80
- Joined: Mon May 20, 2013 11:32 pm
Re: call a native stored procedure from a cobol program
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
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
- Akshya Chopra
- Registered Member
- Posts: 80
- Joined: Mon May 20, 2013 11:32 pm
Re: call a native stored procedure from a cobol program
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
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!
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
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?
- Akshya Chopra
- Registered Member
- Posts: 80
- Joined: Mon May 20, 2013 11:32 pm
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