Hi, I have a simple BTEQ script (given below) to load CLOB data in an empty table.
DELETE FROM TTE ALL;
.IMPORT INDICDATA FILE = C:\TEST\Data_Clob;
USING (LOBTYPE CLOB(1000000000))
INSERT INTO TTE ('1', :LOBTYPE);
When I execute the script, I get the below error:
*** Error: The following occurred during an Access Module read:
Unexpected data format.
*** Warning: Out of data.
*** Warning: EOF on INPUT stream.
With INDICDATA, the file is expected to be in "FastLoad format" with binary length fields and NULL indicator bits at the start. And since you have not said otherwise, BTEQ will expect the CLOB data (up to 32K) to be in-line as a VARCHAR column.
Consider using something like
.IMPORT VARTEXT DEFERCOLS=1 FILE=C:\TEST\Lob_List;
USING (LOBTYPE CLOB(1000000000) AS DEFERRED BY NAME)
INSERT INTO TTE('1',:LOBTYPE);
Where Lob_List is a text file containing the filename for LOB data.