Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
skipping header and trailer while loading DB2 table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: skipping header and trailer while loading DB2 table
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    Post subject: Reply to: skipping header and trailer while loading DB2 tabl
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    Post subject:
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    Post subject: Reply to: skipping header and trailer while loading DB2 tabl
Reply with quote

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

Senior Member


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

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

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

Site Director


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

PostPosted: Mon Jul 16, 2012 7:28 pm    Post subject:
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    Post subject: Reply to: skipping header and trailer while loading DB2 tabl
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: 1777
Location: Bloomington, IL

PostPosted: Tue Jul 24, 2012 7:12 pm    Post subject: Re: Reply to: skipping header and trailer while loading DB2
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: 1013
Location: India

PostPosted: Wed Jul 25, 2012 10:10 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us