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: 6966
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: 1531
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 TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Any docs / links for isub- cobol comp... SRICOBSAS COBOL Programming 4 Fri Aug 26, 2016 2:35 pm


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