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
 

 

Deleting data from more than one partitions using DB2 LOAD

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

New User


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

PostPosted: Mon May 14, 2012 8:45 am    Post subject: Deleting data from more than one partitions using DB2 LOAD
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    Post subject:
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    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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


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