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

DB2 Delete Utility


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

New User


Joined: 24 Jan 2007
Posts: 89
Location: USA

PostPosted: Tue Aug 05, 2008 9:44 am
Reply with quote

Hi,

Is there any DB2 utility available to delete the records from the DB2 table , based on the keys from the input file?


Thanks,
Nagendran.R
Back to top
View user's profile Send private message
Richa Jain

New User


Joined: 18 Mar 2008
Posts: 35
Location: Gurgaon

PostPosted: Tue Aug 05, 2008 11:59 am
Reply with quote

IKJEFT01 utility can be used
Back to top
View user's profile Send private message
Nagendran

New User


Joined: 24 Jan 2007
Posts: 89
Location: USA

PostPosted: Tue Aug 05, 2008 12:28 pm
Reply with quote

Hi,

If we use IKJEFT01 we need to create an applicaion program, but without program is it possible to do.

thanks,
Nagu
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: Tue Aug 05, 2008 7:46 pm
Reply with quote

Hello,

Quote:
If we use IKJEFT01 we need to create an applicaion program,
Why would you believe you must create your own application program? Yes, a program must be run, but SPUFI is a program and is often executed via IKJEFT01.

If you search in the forum you will find several examples. If you find something you do not understand, post what you found and your question and someone will be able to help.
Back to top
View user's profile Send private message
Nagendran

New User


Joined: 24 Jan 2007
Posts: 89
Location: USA

PostPosted: Tue Aug 05, 2008 7:53 pm
Reply with quote

Hello,

Thanks for ur response.

If we use SPUFI, we need to hardcode query for each records that needs to be deleted.

But i dont like to do it so, i am having millions of record needs to be deleted.

My requirement is, input file is having arounfd 10 million records,
I want to delete all the records that present in the input file. I just want to know whether it is possible by using utility?


Thanks,
Nagu
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Aug 05, 2008 8:08 pm
Reply with quote

It would probably be better to unload the database, delete the records from the unload, then reload the database.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 05, 2008 8:26 pm
Reply with quote

Quote:

I just want to know whether it is possible by using utility?


yes, as crag said:

unload, - that is a utility
use sort match/cull - that is a utility
reload - that is a utility
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Aug 06, 2008 12:10 pm
Reply with quote

Nagendran,

Try to do a LOAD REPLACE with a dummy file.

Regds,
Prem
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Thu Aug 07, 2008 12:55 am
Reply with quote

Dont do Load replace with Dummy SYSREC unless you have to delete all the records in the table.!!!

Do you have any idea how the keys came into file.? was it a unload.???

Deleting 10 million records thru DELETE sql is not preferable. If the file contains unload data, then UNLOAD the data apart from the data in the delete file. Now you can do a LOAD REPLACE with the later data so that the data in delete file is no more in table. This is how it is done in most of the shops.

There is an another option of doing REORG with DISCARD option also.
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 DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts REASON 00D70014 in load utility DB2 6
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top