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
 

 

Cleaning up a large table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
RedDevil711

New User


Joined: 04 Jun 2010
Posts: 25
Location: Pune

PostPosted: Tue Sep 16, 2014 12:49 pm    Post subject: Cleaning up a large table
Reply with quote

Hi All,
I just moved to a new work team and received a business request to clean up a large business table. The table, currently has 600 million rows and upwards. If i were to cleanup this table, would it be effective using a COBOL-DB2 program where i make use of the YEAR and QUARTER functions of DB2 ? Basically i am looking at efficient ways of cleaning up a large DB2 table using COBOL. This table was used for archiving transactions done by business. Any pointers on the same would be helpful, thanks.
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1717
Location: UK

PostPosted: Tue Sep 16, 2014 6:12 pm    Post subject: Reply to: Cleaning up a large table
Reply with quote

You coukld unload the table and use your sort program to delete the unwanted rows - assuming cleanup=delete.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Wed Sep 17, 2014 12:31 am    Post subject:
Reply with quote

Code:
IF It is a conditional clean up then
  take a back up and then delete by DB2 utility-additionally if you have any
 partions on date then and need to delete any specific range data then
  use a partion number while you do a delete
ELSE
 Also look for TRUNCATE.
END-IF


It is not efficient to do one by one in COBOL-DB@ program (if thats what you were asking)
Back to top
View user's profile Send private message
RedDevil711

New User


Joined: 04 Jun 2010
Posts: 25
Location: Pune

PostPosted: Wed Sep 17, 2014 1:39 pm    Post subject:
Reply with quote

Thanks for the replies Nic and Rohit.
I do have a date specific range for clean up, I will look at the option Rohit suggested based on partitions allocated based on date.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Nov 05, 2014 4:02 pm    Post subject:
Reply with quote

Hello There,

You can also use REORG DISCARD option to delete the MASS data for any specific criteria.
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 Not able to compress a very large PDS Hervey Martinez JCL & VSAM 7 Fri Nov 04, 2016 5:57 pm
No new posts VSAM define for large file jerryte JCL & VSAM 9 Wed Oct 05, 2016 1:51 am
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


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