Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
LOAD utility REPLACE option

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

New User


Joined: 10 Dec 2012
Posts: 37
Location: India

PostPosted: Wed Feb 27, 2013 5:59 pm    Post subject: LOAD utility REPLACE option
Reply with quote

HI All,

There is a production job which uses LOAD utility to load a table. It is as follows.

LOAD DATA
REPLACE COPYDDN (COPY01)
STATISTICS TABLE (ALL) INDEX (ALL) UPDATE ALL
LOG NO
SORTKEYS 900000 SORTDEVT SYSDA
DISCARDS 0
INTO TABLE DB2FS001.TFSA092_UPC_HIER
(

I know that LOAD REPLACE statement would first delete any existing row and replaces the data with the new data.

I just want to know when the existing rows are deleted, will the space occupied by the rows also get freed up or should a reorg is to be performed to free the space?
Back to top
View user's profile Send private message

gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Wed Feb 27, 2013 11:48 pm    Post subject:
Reply with quote

read manuals icon_smile.gif
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Feb 28, 2013 10:19 am    Post subject:
Reply with quote

Hi Musab,

Welcome to IBMMAINFRAMES!

When you do a LOAD REPLACE, db2 will redefine the dataset itself, so space occupied by the existing rows will be gone along with the dataset. For DB2 to do that below conditions should be satisified.
1) Tablespace should have been created in DB2 managed storage groups.
2) REUSE option should not be used.

Regards,
Sushanth
Back to top
View user's profile Send private message
Musab Ahmed

New User


Joined: 10 Dec 2012
Posts: 37
Location: India

PostPosted: Thu Feb 28, 2013 11:02 am    Post subject:
Reply with quote

Hi Sushanth,

Sorry for my ignorance, but what do you actually mean by

"space occupied by the existing rows will be gone along with the dataset"

Does this mean the space will be re-utilized for the new LOAD statement?
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Feb 28, 2013 11:51 am    Post subject:
Reply with quote

Hi Musab,

icon_smile.gif

redefine = delete the existing dataset -> create new dataset

So, i said
Quote:
When you do a LOAD REPLACE, db2 will redefine the dataset itself, so space occupied by the existing rows will be gone along with the dataset.

Since rows will be loaded to new dataset

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 Deleting rows using utility from DB2 ... manugeorge2004 DB2 2 Tue Jun 25, 2019 6:41 pm
No new posts refresh data from production - update... jzhardy DB2 1 Mon May 06, 2019 5:06 pm
No new posts How to copy\replace the members in pr... abdulrafi JCL & VSAM 6 Fri Mar 22, 2019 7:02 pm
No new posts Add week number to a file name or rep... tejdeep0274 JCL & VSAM 2 Thu Jan 03, 2019 6:49 am
No new posts DB2 Unload / Load Multiple tables neo4u DB2 8 Tue Nov 27, 2018 3:43 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us