Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Special Linkage for DB2 Stored Procedure

$
0
0

I think the problem is the parameter that you are passing to the stored procedure and you haven't shown me that yet.

Can you show me what the actual call looks like to the stored procedure?

You can define special host variables that handle variable length strings like varchars. They have to be defined like the first parameter in your stored procedure only they require that a level 49 be used for the elementary fields and not 05 as you have specified and then you can reference them by the group item name within your SP call:

01 TRBLINP.                                      

     49 TRBLINP-IO-LEN      PIC S9(04) COMP-5.  

     49 TRBLINP-IO-TEXT     PIC X(41).      

If you then set the text field to the data item and the length field to the actual length and use TRBLINP as the parameter name then it should work correctly.

You cannot simply pass in a literal string to a SP that is expecting a variable length field but you must use a host variable as shown above.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>