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
 

 

DB2 Delete Utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DB2 Delete Utility
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    Post subject:
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    Post subject: Reply to: DB2 Delete Utility
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

Site Director


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

PostPosted: Tue Aug 05, 2008 7:46 pm    Post subject:
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    Post subject: Reply to: DB2 Delete Utility
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Tue Aug 05, 2008 8:26 pm    Post subject:
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

Moderator


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

PostPosted: Wed Aug 06, 2008 12:10 pm    Post subject:
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    Post subject: Reply to: DB2 Delete Utility
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    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 Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
No new posts HLIST Utility In Batch Virendra Shambharkar TSO/ISPF 4 Fri Apr 07, 2017 3:38 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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