473,545 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2589
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("COLD EL0x09");
ModType = static_cast<DB2 CLI::sqlchar*>( malloc(sizeof(s hort) +
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
2228
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 command like: LOAD DATA INFILE 'absolute path to file.csv' IGNORE INTO TABLE table-name FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES...
1
5026
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 DSNU005I DSNUGPRS - DECLARE C1 CURSOR FOR SELECT * FROM LIQ53TST.TLS_BRANCH DSNU005I DSNUGPRS - ENDEXEC DSNU005I DSNUGPRS - LOAD...
7
7572
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 the status of the utility. Is it also possible in UDB? I'm using UDB 8.1 on windows 2000. Thanks for your time.
3
2304
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 NONRECOVERABLE WITHOUT PROMPTING Yet when I try to execute the same statement in a PreparedStatement it does not work, but gives me a SQLException:
6
8876
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 statement: db2 load client from /loadspace/re000000.txt of del replace into INET.INSRP_SURP_PROP_TBL nonrecoverable To be even more...
5
2161
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 nutshell description of the test. The testing was done at "DB2/LINUX 8.2.3". Tables for tests: F4106 has 5203 rows, 32 columns. F42199 has...
1
5907
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 SET INTEGRITY statement C. With the DELETE phase of the LOAD D. With the UPDATE CONSTRAINTS statement Answer is A
1
3956
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. Also if it does commit when does the records gets COMMITED meaning at the end of the full load or after each loaded record Is there any COMMIT...
0
1953
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 b23456789012345678901234567890b234567890
2
9366
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 PROCEED UTILITY EXECUTION TERMINATING, RETURN CODE = 8
0
7669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7926
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7773
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3468
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.