Hi,

I'm trying to write an Oracle CLOB object using a COBOL application and Pro*COBOL. The following code is derived from the Oracle Documentation example. However, I would always get the fatal error
"Attempt to access item beyond bounds of memory (Signal 10)"
at the SQLBEX-call for the LOB WRITE statement.

Here's my code (reduced by EXEC SQL / END-EXECs):

ALLOCATE :WC-MESSAGE-TXT

SELECT MESSAGE INTO :WC-MESSAGE-TXT
FROM T_MESSAGE
WHERE ID = :WV-ID
FOR UPDATE

LOB WRITE :WC-MESSAGE-LEN
FROM :WV-MESSAGE
INTO :WC-MESSAGE-TXT

FREE :WC-MESSAGE-TXT

All the Variables used are correctly initiated, I can even retrieve the correct length of the LOB value.Without allocating the LOB, the same error message occurs but with signal 11 (which is obvious: segmentation fault because of non-initialized LOB locator).

Can anyone help me with this problem?

Thanks, Ulf