Question Regarding Parameters for DB2 COBOL Stored Procedure

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rsreeni
    New Member
    • Sep 2008
    • 2

    Question Regarding Parameters for DB2 COBOL Stored Procedure

    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
  • giffy
    New Member
    • Aug 2008
    • 9

    #2
    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.

    Code:
    LINKAGE-SECTION
      01 link-param.
          10 param1 pic x(32000).
          10 param2 pic x(10).
    ---

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

    Code:
    String stmt = "call" +  prodecureName + "(" + inpParam + ")";

    Comment

    Working...