View previous topic :: View next topic
|
Author |
Message |
chandracdac
New User
Joined: 15 Jun 2007 Posts: 92 Location: bangalore
|
|
|
|
Hi
I am loading my UDB DB2 table using below import command
Import from 'D:\data\tempdata.txt' OF DEL MODIFIED BY NOCHARDEL COLDEL0x09 replace into tablecreator.table_name
i know we can skip the header using skipcount or restart count. But Here i want to skip both header and trailer while importing data from the file.
My data file has millions of records and we don't want to open and the file and delete the header and trailer.
Any idea how we can do this in IMPORT command..
Thanks,
Chandra |
|
Back to top |
|
|
chandracdac
New User
Joined: 15 Jun 2007 Posts: 92 Location: bangalore
|
|
|
|
Forgot to mention i am using DB2 command prompt to load my table .. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
you might try a DB2 LUW forum. |
|
Back to top |
|
|
chandracdac
New User
Joined: 15 Jun 2007 Posts: 92 Location: bangalore
|
|
|
|
Link pls |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Google, please? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Create the load file without the header and trailer. . .? |
|
Back to top |
|
|
chandracdac
New User
Joined: 15 Jun 2007 Posts: 92 Location: bangalore
|
|
|
|
I have already mentioned i can't open my file and delete header and trailer or i can't do some other process to remove header and trailer.I want to use the same file and skip header and trailer while loading. this is what i am looking for
Thanks,
Chandra. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
chandracdac wrote: |
I have already mentioned i can't open my file and delete header and trailer or i can't do some other process to remove header and trailer.I want to use the same file and skip header and trailer while loading. this is what i am looking for |
Actually what Mr. Scherrer wrote was:
Quote: |
Create the load file without the header and trailer. . .? |
You're speaking of editing the file, a completely different process.
I think that there's a way to do this. However, to echo GuyC, first provide some evidence that you're trying this on a z/OS box; what you've written so far suggests the opposite. |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Chandracdac,
Better to get this done outside of DB2, since you are windows you can write a small program in C, C++, VB Script, C# console program or POWERSHELL to strip the header & trailer. Here's a start in VBscript
If the input file is coming from mainframe, here is the dfsort technique and this one also uses DFSORT
Also you should definately read this article1, article2 and article3.
Thanks,
Sushanth |
|
Back to top |
|
|
|