Connecting Tech Pros Worldwide Help | Site Map

Question Regarding Parameters for DB2 COBOL Stored Procedure

Newbie
 
Join Date: Sep 2008
Posts: 2
#1: Sep 23 '08
Hi,

We are planning to use Cobol Stored procedures for doing our Data retrieval from DB2 Tables. The stored procedure(s) will be called from J2EE application via Db2 Connect.

Does the linkage restriction of 32K apply to the parameters getting passed into COBOL DB2 Stored procedures also?

Thanks,

-Sreeni
Newbie
 
Join Date: Aug 2008
Posts: 9
#2: Sep 29 '08

re: Question Regarding Parameters for DB2 COBOL Stored Procedure


why dun you try on your own.

Use a parameter in your stored procedure.

And while passing it make it two parameters.
The first will be spaces 32K in leght. generate it using a loop.

and add to the end Second parameter that is of your need with some value may be 'TEST'

Then debug the application after calling it using java by making callable prepated statements. And see whether you are able to get the expected value is procedure section or not.

Expand|Select|Wrap|Line Numbers
  1. LINKAGE-SECTION
  2.   01 link-param.
  3.       10 param1 pic x(32000).
  4.       10 param2 pic x(10).
---

so while making the callable statement just use one concatenated parameter.

Expand|Select|Wrap|Line Numbers
  1. String stmt = "call" +  prodecureName + "(" + inpParam + ")";
Reply