MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CLOB value passed to a Stored Procedure

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
SMS
Beginner


Joined: 16 Oct 2005
Posts: 53
Topics: 24

PostPosted: Sun Mar 30, 2008 9:24 am    Post subject: CLOB value passed to a Stored Procedure Reply with quote

Hi

I need some help in using the CLOB data type.

I need to pass big volume of data (in MBs) from a Cobol program to a DB2 stored procedure(SP) using a single parameter. The SP is using an external cobol program which will receive the parameter passed, parse the data and insert into a table.

Since the varchar varaible can hold only up to some 32K I have decided to use the CLOB variable in COBOL. But this CLOB data will not be stored in DB2 table at any point of time. I am moving the input data in the Calling program itself.

I have declared the variables as follows.

Code:

Calling COBOL program
01 BULK-DATA USAGE IS SQL TYPE IS CLOB(1M).

Stored Procedure

(IN IN_BULK_DATA CLOB(1M)
 OUT OUT_SQLCODE INTEGER)

External COBOL program

Linkage Section

01 L-BULK-DATA   USAGE IS SQL TYPE IS CLOB(1M).
01 L-SQL-CODE  PIC S9(9) comp-4




Now when I execute the Calling COBOL program, the stored procedure is called and executes successfully but it's not inserting the data and also not returning any sort of errors.

When I change the CLOB to some varchar variable the program and SP are working fine as intended. Also, when I try to use the External program as a SUB-program and pass the CLOB data from the calling program to the sub-program without using the SP, the programs are working fine as intended.

But when I pass the CLOB data from the program to SP, it's not working.
Actually this SP will be called from a front end screen. Just for testing I am using a COBL program to call this SP.
I would appreciate any help in this regard.
_________________
Regards,
SMS
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group