473,855 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

db2 load content from text file

5 New Member
Hi Guys,

I want to load contents from a text file to a db2 table.I have already created the table with the same column names as in the text file.Can anybody help me out?

Thanks in advance,
Vandana
Jan 2 '08 #1
7 27736
SB41093
3 New Member
Hi Guys,

I want to load contents from a text file to a db2 table.I have already created the table with the same column names as in the text file.Can anybody help me out?

Thanks in advance,
Vandana
Dear Vandana,

You can use the db2 load utiliy script to load the data from the text file which is your source.
Jan 4 '08 #2
vandananambiar
5 New Member
Dear Vandana,

You can use the db2 load utiliy script to load the data from the text file which is your source.


Hi,
Thank you for your reply.

My source ASCII text file is in Windows and i want to load it into db2 table in Linux environment.I tried with load command.But then its showing invalid source path error.

Looking forward to your reply.
Vandana
Jan 4 '08 #3
SB41093
3 New Member
Dear Vandana,

use the following script:

db2 Load From </pathname/filename> OF ASC modified by stripblanks reclen <the record length coming from the ascii file> method L(the positions) message <the msg pathname where the warnings and the error has to go> INSERT INTO table name(columns names)

regards,
Shilpa



Hi,
Thank you for your reply.

My source ASCII text file is in Windows and i want to load it into db2 table in Linux environment.I tried with load command.But then its showing invalid source path error.

Looking forward to your reply.
Vandana
Jan 9 '08 #4
vandananambiar
5 New Member
Dear Vandana,

use the following script:

db2 Load From </pathname/filename> OF ASC modified by stripblanks reclen <the record length coming from the ascii file> method L(the positions) message <the msg pathname where the warnings and the error has to go> INSERT INTO table name(columns names)

regards,
Shilpa

Hi Shilpa,

I tried with the script which you have given.But again it is showing invalid source path error.I think its because the source ASCII file is in windows and Db2 table, which i am trying to load is in Linux OS.So windows path name cannot be identified by a linux OS without knowing its IP address.Can u please try on this concept?


Regards,
Vandana
Jan 10 '08 #5
docdiesel
297 Recognized Expert Contributor
Hi,

I enhanced the thread title a little bit to make it more accurate and give others a better chance to find it.

Btw., you'll find some examples at IBM site (http://publib.boulder.ibm.com/infoce...c/r0004601.htm ).

Regards,

Bernd
Jan 11 '08 #6
Jal
10 New Member
Use the foll:
db2 load Client from <Source file name> of del Modified by COLDEL, UseDefaults Messages <Error file name> insert into LOAD.T_ORDERS NONRECOVERABLE

Client specifies that you are running the LOAD command from a client m/c.
del specifies that the file is delimited.
Coldel, specifief that the column delimiter is comma(,)
insert says that the records are to be appended (insert) to the table.

for more details refer DB2 documentation
"Data Movement Utilities Guide and Reference"
Jan 21 '08 #7
vandananambiar
5 New Member
Use the foll:
db2 load Client from <Source file name> of del Modified by COLDEL, UseDefaults Messages <Error file name> insert into LOAD.T_ORDERS NONRECOVERABLE

Client specifies that you are running the LOAD command from a client m/c.
del specifies that the file is delimited.
Coldel, specifief that the column delimiter is comma(,)
insert says that the records are to be appended (insert) to the table.

for more details refer DB2 documentation
"Data Movement Utilities Guide and Reference"


Hi,

Thanks a lot!!!!

Regards,
Vandana
Jan 29 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

15
4327
by: | last post by:
The data file is a simple Unicode file with lines of text. BCP apparently doesn't guarantee this ordering, and neither does the import tool. I want to be able to load the data either sequentially or add line numbering to large Unicode file (1 million lines). I don't want to deal with another programming language if possible and I wonder if there's a trick in SQL Server to get this accomplished. Thanks for any help. Mark Leary
60
49241
by: Julie | last post by:
What is the *fastest* way in .NET to search large on-disk text files (100+ MB) for a given string. The files are unindexed and unsorted, and for the purposes of my immediate requirements, can't be indexed/sorted. I don't want to load the entire file into physical memory, memory-mapped files are ok (and preferred). Speed/performance is a requirement -- the target is to locate the string in 10 seconds or less for a 100 MB file. The...
2
1553
by: Johan Wendelstam | last post by:
Hi I am trying to let the users select a txt file on their drive and then import all the text in it to a textbox ? I have figured out how to access a file on the server and import it but not how I could read a file on the clients disk ? And another question I am curious about how hard is it to export/import mails to outlook if it possible ? Thanx in advance guys..
1
1237
by: Parvez | last post by:
BOF BD|0001|20060403001|1 BO|1|BSE|0001|B|06/B-04130973|77160200000000001|200604031145|2005061|20060403|30/04/2006-03/04/2006|500085|EQT|AR|27.55|3 BT|1|1001|115031|100|29.05 BT|2|1009|115040|100|29.20 BT|3|1011|115044|50|29.25 EOF This is a prototype that can be in my text file.My web service will have to read the content of the file and will have to store it in a string as given
1
4770
by: galivio | last post by:
I need a code in C where accepts inputs coming from an external text file and will give an output stored on another text file. For example, a C program to compute the sum of the two integers. The value of the two integers are taken in a text file, example "input.txt" and written in this manner: 2 3 where 2 is the value of the first integer and 3 is the value of the second integer. The code should load the text file and assign variables to...
2
9411
by: shahriarshams | last post by:
Hiya, I have a series of data in a text file which contains date and rainfall. I want to load the text file into my rainfall table into the database. The text file is 1-Jan-89 1 2-Jan-89 0 3-Jan-89 2 4-Jan-89 0
6
24161
by: ivan.perak | last post by:
Hello, im a beginner in VB.NET... The thing i would like to do is as it follows.... I have a text file (list of names, every name to the next line) which is about 350000 lines long. I would like to split it and create a new file at every lets say 20000 lines... so, the directory output would have to be something like this:
1
1885
by: vjunkl | last post by:
Hello, I have a content text file in my project and I'd like to copy it to a folder at some point in the execution of the application(not during a build). If this is not possible, how about reading a content text file into a string. This will do the job just as well, maybe better. Thanks in advance. Vince
1
4436
by: mrjaune | last post by:
Hi Everyone, I try to load a text file into a listview. Here is my text file: 10 "Babar" 9 6 15 "Robert" 3
8
3252
by: amphetaman | last post by:
Is there a safe (unlikely to cause overflows or segfaults) way to load a text file into a char ** array? I thought of using getline, but it needs a fixed-length string, and I don't know how many lines or characters per line the file has.
0
9903
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11044
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10692
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10767
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9526
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7927
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5952
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4567
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
3
3194
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.