468,110 Members | 1,921 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,110 developers. It's quick & easy.

Question Regarding Parameters for DB2 COBOL Stored Procedure


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?


Sep 23 '08 #1
1 2677
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
  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 + ")";
Sep 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Maciek | last post: by
2 posts views Thread by Gary | last post: by
9 posts views Thread by Mike Hofer | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.