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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am


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