65 pts.
 Calling a stored procedure in COBOL
I'm looking for samples of how to code and compile a call of a stored procedure in a COBOL program? The stored procedure is delivered as part of a software package. No coding examples were provided in the documentation.

Software/Hardware used:
ASKED: November 26, 2007  6:27 PM
UPDATED: March 1, 2010  7:22 AM

Answer Wiki:
Here's one from IBM: http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.apsg/db2z_xmpcobolstoredproceduregeneral.htm Here's one from Search400.com : http://search400.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid3_gci1127908,00.html Here is a link to several more: http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&source=hp&q=Calling+a+stored+procedure+in+COBOL&btnG=Google+Search
Last Wiki Answer Submitted:  December 14, 2009  10:12 pm  by  Tw   65 pts.
All Answer Wiki Contributors:  Tw   65 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

It’s not clear what you need. The basic CALL for a stored proc:

exec-sql
     call  storedProcName  ( :inVar1, :o utVar2 )
end-exec.

Is that all you’re looking for? You CALL a stored proc in COBOL similar to how you’d do it in any HLL, with some syntax variations. In the above, there’s on COBOL variable that is an IN parameter to the stored proc, and there’s one OUT variable. The COBOL variables are inVar1 and outVar2 in that case.

Tom

 107,935 pts.