IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to empty a table by using Load utility


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hari korrapati

New User


Joined: 27 Mar 2011
Posts: 4
Location: India

PostPosted: Sun May 22, 2011 6:45 pm
Reply with quote

Hi,

I have one cenario like how to empty a table by using LOAD utility in db2 v9.1.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Sun May 22, 2011 9:20 pm
Reply with quote

Load an empty data set.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Mon May 23, 2011 12:41 am
Reply with quote

.. empty file..
Exact : like this :
Code:
//LOAD     EXEC PGM=DSNUTILB,PARM=(DB2N,'EMPTY.LOAD')                 
//SYSUT1    DD DISP=(NEW,PASS),DSN=&&SYSUT1                             
//SORTOUT   DD DISP=(NEW,PASS),DSN=&&SORTOUT                           
//SYSPRINT  DD SYSOUT=*                                                 
//SYSOUT    DD SYSOUT=*                                                 
//SYSREC    DD DUMMY                                                   
//SYSIN     DD *                                                       
LOAD DATA INDDN SYSREC   LOG YES REPLACE                               
 EBCDIC  CCSID(00500,00000,00000)                                       
 INTO TABLE CCCCC.XX_XXX_XXX       "                             
/*                                                                     
//*--------------------------------------------------------------------*
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon May 23, 2011 12:57 pm
Reply with quote

if it's the only table in the tablespace!!
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Mon May 23, 2011 2:23 pm
Reply with quote

GuyC wrote:
if it's the only table in the tablespace!!

If it's not, shoot the DBA who designed it.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon May 23, 2011 5:49 pm
Reply with quote

Akatsukami wrote:
GuyC wrote:
if it's the only table in the tablespace!!

If it's not, shoot the DBA who designed it.
IBM catalog? Default Explain-tables? QMF tables,...
I think IBM is the only one who doesn't follow their own recommendations ;)
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Mon May 23, 2011 7:25 pm
Reply with quote

Quote:
If it's not, shoot the DBA who designed it.


It depends on the application.

We have test 'databases' used by our development staff that have 600 tables and only three tablespaces.

This design is much more flexible and efficient space wise.

Just don't use the Dummy Load Replace.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top