There is a db2 load API in C ...which you can use for the same ..
Sample :
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.
udb.doc/ad/samples/c/s-tbload-sqc.htm
Knuth Stoze had given a wonderful explanation for the same
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0505stolze/inde
x.html#load
for tab delimited text you
may need to add FILETYPE modifier ..the ascii code of tabcharacther ie
0x09..something like below
DB2CLI::sqlchar* pModType;
String modString("COLDEL0x09");
ModType = static_cast<DB2CLI::sqlchar*>(malloc(sizeof(short) +
modString.Size() + 1));
pModType->length = modString.Size();
strcpy(pModType->data, modString);
You can try using sysproc.db2load stored procedure with filetype
modfier COLDEL0x09
Regards,
Kiran Nair
Suresh - 02 May 2006 13:46 GMT
Hi Kiran
By using second link i got much more idea...
But This is load data by using default format...
Where should I change in .c file or script file so that i can load tab
delimited text file...
Because I need to load tab delimited text file...
Thanks and regards
Suresh