If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Stored procedure with VARCHAR data as parm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-04, 10:51
ranjir75 ranjir75 is offline
Registered User
 
Join Date: Aug 2003
Location: India
Posts: 13
Stored procedure with VARCHAR data as parm

Hi All,

We are facing a critical problem here. We have a COBOL-CICS program in one LPAR and one sub system that CALLS a COBOL-DB2 stored procedure in same LPAR but in different DB2 subsytem.

The Stored procedure should pass back a VARCHAR data of about 16000.

In the Calling program we have defined this as
01 PARM1
49 parm1len s9(4) comp.
49 parmtext x(16000).

In the stored procedure program, we defined it as
01 LS-PARM1
49 LS-parm1len s9(4) comp.
49 LS-parmtext x(16000).

But still we are not able to retrieve the VARCHAR data in the calling program ? But we are getting the data displayed in the WLM sysout of the SP

Can anybody throw some valuable info regarding. Are we need to look for some specific compiler option for this ?

Any help will be highly appreciated

Thxs in advance
__________________
Thanks
Ranjith
Reply With Quote
  #2 (permalink)  
Old 01-21-04, 15:25
k_vasu k_vasu is offline
Registered User
 
Join Date: Aug 2002
Posts: 35
I know this problem. This is just becuase of your wrong comiple options. If you compile wrong options it limits to 10,000 bytes (max size).

Proper compile options:

For stay resident --- Yes option
RENT,TRUNC(BIN),NODYNAM,DATA(31)
RENT,AMODE(31),RMODE(ANY),REUS

For stay resident --- No option
TRUNC(OPT),NODYNAM,AMODE(31)
RENT,AMODE(31),RMODE(ANY)

these will limit each output parameter to 32k but try to size it to get bettre performance. Best of luck Need more help let me know.
__________________
vasu
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On