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

Deleting data from more than one partitions using DB2 LOAD


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

New User


Joined: 08 Oct 2006
Posts: 61
Location: San Diego

PostPosted: Mon May 14, 2012 8:45 am
Reply with quote

Hi,

I am planning to delete records from more than 1 partitions in a table using the DB2 load utility.

I have used :
Code:
LOAD DATA RESUME(YES)  ENFORCE CONSTRAINTS                     
  INDDN(SYSRECAC) INTO TABLE IXY1.MAIN_ITM PART 2 REPLACE
where SYRECAC contains an empty file
to delete records from second partition and it works successfully.
Do we have LOAD commands to delete from a range of partitions- say partitions 2 to 4 or 1 to 2.
I have tried
Code:
LOAD DATA INDDN(SYSRECAC)                       
RESUME YES                                     
INTO TABLE IXY1.MAIN_ITM REPLACE PART 1:2
but I get error messages like INVALID OPERAND '2' FOR KEYWORD 'INTO' .

Thanks in advance for any help and info. on this
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Mon May 14, 2012 4:26 pm
Reply with quote

Hi,

Please find below control card... not tested...

Code:

LOAD DATA                                                                                                                             
  INTO TABLE DBA01.TBLX3303                                               
    PART 1 REPLACE                                                               
    INDDN PART1                                                           
    DISCARDDN DISC1                                                       
      (EMPNO      POSITION(1)    CHAR(6),                                 
       LASTNAME   POSITION(8)    VARCHAR(15),                             
       SALARY     POSITION(25)   DECIMAL(9,2))                           
  .                                                                       
  .                                                                       
  .                                                                       
  INTO TABLE DBA01.TBLX3303                                               
    PART 5 REPLACE                                                               
    INDDN PART5                                                           
    DISCARDDN DISC5                                                       
      (EMPNO      POSITION(1)    CHAR(6),                                 
       LASTNAME   POSITION(8)    VARCHAR(15),                             
       SALARY     POSITION(25)   DECIMAL(9,2))               


Let us know if this works...
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 Store the data for fixed length COBOL Programming 1
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top