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: 1787
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: 1787
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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts count contained values of several col... DB2 5
No new posts IBM IMU Utility for Easytrieve Code t... IBM Tools 0
No new posts Use of long filenames with GDKUTIL ut... IBM Tools 3
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts Setting RC using NULLOFL/NOTMTOFL for... SYNCSORT 6
Search our Forums:


Back to Top