Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1278
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: 1738
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Command UNIQUE CONSTRAINT on any tabl... rohanthengal DB2 2 Thu Aug 18, 2016 3:48 pm
No new posts Updating online Db2 table kishpra DB2 3 Fri Aug 12, 2016 2:44 pm
No new posts Getting soc4 on internal table in cobol abdulrafi COBOL Programming 13 Fri May 06, 2016 3:39 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us