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
 

 

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 TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm


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