467,202 Members | 1,114 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,202 developers. It's quick & easy.

Load Utility

Hi All

I am new to DB2. So i dont have knowledge of DB2 API. I dont have
knowledge of how to use API ...

I have requirement of loading data from tab delimited text file in to
Db2. For this I came across LOAD utility in DB2. But now my problem is
that I am loading data periodically without any user intervation....So
I want to call this load utility by using java program or by using some
routine such as Stored procedure or user defined function is it
possible? If so please provide me detail and if possible then code


May 2 '06 #1
  • viewed: 2308
2 Replies
There is a db2 load API in C ...which you can use for the same ..
Sample :

Knuth Stoze had given a wonderful explanation for the same


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

Kiran Nair

May 2 '06 #2
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

May 2 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Rick | last post: by
1 post views Thread by Carmine | last post: by
3 posts views Thread by claus.hirth@abraxas.ch | last post: by
6 posts views Thread by jrthor2 | last post: by
1 post views Thread by huyuhui@gmail.com | last post: by
reply views Thread by Eric Davidson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.