IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

skipping header and trailer while loading DB2 table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chandracdac

New User


Joined: 15 Jun 2007
Posts: 92
Location: bangalore

PostPosted: Mon Jul 16, 2012 11:14 am
Reply with quote

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
View user's profile Send private message
chandracdac

New User


Joined: 15 Jun 2007
Posts: 92
Location: bangalore

PostPosted: Mon Jul 16, 2012 11:17 am
Reply with quote

Forgot to mention i am using DB2 command prompt to load my table ..
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Jul 16, 2012 12:04 pm
Reply with quote

you might try a DB2 LUW forum.
Back to top
View user's profile Send private message
chandracdac

New User


Joined: 15 Jun 2007
Posts: 92
Location: bangalore

PostPosted: Mon Jul 16, 2012 12:23 pm
Reply with quote

Link pls
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Jul 16, 2012 3:35 pm
Reply with quote

Google, please?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Jul 16, 2012 7:28 pm
Reply with quote

Hello,

Create the load file without the header and trailer. . .?
Back to top
View user's profile Send private message
chandracdac

New User


Joined: 15 Jun 2007
Posts: 92
Location: bangalore

PostPosted: Tue Jul 24, 2012 4:53 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Jul 24, 2012 7:12 pm
Reply with quote

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
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Wed Jul 25, 2012 10:10 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top