Hi
I am trying to load a flat file containing BLOBs into DB2 V8 on iSeries V5R3.
Is there a way I can use CPYFRMIMPF to get the data loaded?
Please advice.
I am new to iSeries and DB2. Any help is much appreciated.
The matching column in DB2 is also a BLOB.
I ran the following sql to create the table I am trying to populate as:
CREATE TABLE PROGC(
COMXYZABCD_ID FOR COLUMN I_COM00001 INTEGER NOT NULL ,
FA_ID VARCHAR(4) CCSID 37 NOT NULL ,
COMXYZABCD_DATA FOR COLUMN BL_CO00001 BLOB(1048576) DEFAULT NULL ,
USER_ID VARCHAR(20) CCSID 37 DEFAULT NULL ,
D_ADD TIMESTAMP DEFAULT NULL ) ;
The data file contains records in the following format:
1^|AB|^|XYZ.001.0.475/|^|1234ID|^|2004-10-18-11.48.50.295000|
The XYZ.001 file referenced by the blob XYZ.001.0.475 contains the actual xml values.
When I ran the CPYFRMIMPF i got the following warning message:
"the selected table contains LOB columns, which require use of secondary stream files.These files contain actual LOB data for import. The corresponding columns of data file contain name and path of the secondary stream file.The import operation will otherwise. See CPYFRMIMPF command for more help".
Thanks Mercury2 for the post.
Yes. The flat file is on IFS.
We are using BLOBs since we receive xml data in the BLOBS.
Also doing some research I found out that we cannot use CPYFRMIMPF command to import files containing BLOBS.
Db2 load and import utilities seem to be other options.
I am currently looking how I can make use of either one to load data.
Have you used them before please advice..
Also IMHO I think that you cannot straightforwardly use CPYFRMIMPF to import a file containing blobs.
I've never used Db2 load nor import utilities. This pertains to another domain as mine, ie iSeries and DB2 UDB for iSeries. Not able to help you in that way, apologies.
"You'd have to read the blob [from the IFS] into a program in its entirety, and then move it to the BLOB field. You would need to use embedded SQL to assign the value to the blob field."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.