Solved

Automate Import of Text File Into DB2

Posted on 2008-06-13
3
787 Views
Last Modified: 2008-06-16
Hello,
I need to automate a twice daily text file into a DB2 database.
What would be the best way to accomplish this.
I could have the file FTP'd to a directory where the database could get to it. I don't know where to go from there and my experience is with SQL Server. Is there some analog to DTS in DB2?
0
Comment
Question by:stopher2475
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
3 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 21791949
  Hi!

Yes you should do a simple LOAD of the files into a table by simply executeing

db2 "load from 'testfile' of del insert into workemployee"

and you probably have to put the full path to the file inside the single quotation mark.
What version of DB2 are you using and on what OS ?

Regards,
   Tomas Helgi
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 21791963
0
 
LVL 25

Assisted Solution

by:Tomas Helgi Johannsson
Tomas Helgi Johannsson earned 500 total points
ID: 21792010
If you are using DB2 on Linux or Windows you could alwas generate
a scheduled task (cronjob on Linux) which checks if the file is in the directory and loads the file into
the table if it exists and the db2 command for that is the command I described in my first comment.

Regards,
   Tomas Helgi
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to access tables of DB2 in Excel 8 255
as400 interactive sql phone number search 7 146
MS/SQL OpenQuery to linked DB2 Server error 3 147
Getting missing rows 16 89
November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question