473,409 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

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
also....

Thanks
Suresh

May 2 '06 #1
2 2576
There is a db2 load API in C ...which you can use for the same ..
Sample :
http://publib.boulder.ibm.com/infoce...tbload-sqc.htm

Knuth Stoze had given a wonderful explanation for the same

http://www-128.ibm.com/developerwork...ndex.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

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
Suresh

May 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rick | last post by:
When using the load utility on a CSV file, it seems I always need to edit the input file and add an extra comma after the last field in order for MySql to parse the line properly. I use a...
1
by: Carmine | last post by:
I'm getting this error when I submit the job: DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = LOADSQL DSNU005I DSNUGPRS - EXEC SQL DSNU082I DSNUGPRS - INVALID KEYWORD - EXEC...
7
by: Xie Qing | last post by:
Hi all, Is there a tool or view to display the status of a Load utility job on windows or Unix(say loading few million rows into a table)? I understand in OS/390 there is a dis utility to show...
3
by: claus.hirth | last post by:
When I execute the following statment using the Command Center it works: LOAD CLIENT FROM 'Y:\\TheFixedWidthData.txt' OF ASC METHOD L ( 1 1,2 11,12 17) REPLACE INTO S00.TheTargetTable...
6
by: jrthor2 | last post by:
I have a shell script I am trying to run that loads a table from a control file. The file I am trying to load is delimited by the "}" character. How do I set the delimeter code? Here is my load...
5
by: Konstantin Andreev | last post by:
Recently I became interested, - Are the data, bulk loaded in the table with LOAD utility, consume the same disk space as loaded with IMPORT utility? The answer turned out to be NOT ! Here is a...
1
by: huyuhui | last post by:
The following is a question of LOAD utility. Question: How does the DB2 enforce table check constraints for data added to table with the LOAD utility? A. With the BUILD phase of LOAD B. With the...
1
by: dbuser | last post by:
Hi I am new to Db2. I am planning to load around 5 million Data using DB2 LOAD utility. Do this utility have an inbuilt COMMIT statement so that i do not get any table locks/deadlock error. ...
0
by: Eric Davidson | last post by:
I am try to find a way to get load to reject a record if the data is too large and not just truncate it. eg. c:\temp\fred3.txt ------ a23456789012345678901234567890...
2
by: venkateswari | last post by:
Need Information on ‘how to terminate a load utility?’ I am getting the following error while loading a table: DB2 OBJECT DEFINITION(S) HAVE CHANGED PRIOR TO UTILITY RESTART. UNABLE TO...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.