SMS Beginner
Joined: 16 Oct 2005 Posts: 53 Topics: 24
|
Posted: Sun Mar 30, 2008 9:24 am Post subject: CLOB value passed to a Stored Procedure |
|
|
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 |
|