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 Specific Set of Rows and Replacing with New Rows

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

New User


Joined: 25 Jul 2006
Posts: 24

PostPosted: Fri Sep 26, 2008 4:38 pm    Post subject: Deleting Specific Set of Rows and Replacing with New Rows
Reply with quote

Hi,

I have a table containing records for all Departments.
I want to override the rows of only a specific department (Say Dept-A) with new rows.
For ex if Dept-A has 5 Rows, and the New set has only 3 Rows, and I want only the 3 Rows to be inserted under Dept-A , rest of the 2 Rows should be deleted.
The Size of the Table is about a Million. Approximate size of the Dept rows will be 3000.And the table should be available all the times. Is it possible to use LOAD (with NO COPYPEND) or any other functionality is available? Please advise.

Thank you
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Sep 26, 2008 6:01 pm    Post subject:
Reply with quote

Hi,

I have an idea.
Unload the table without the rows having DEPT-A.
Prepare a LOAD job wiht SHRLEVEL CHANGE on a LOAD RESUME with LOG YES. With this kind of setting LOAD will be just a INSERT processing.

LOAD the UNLOADED FILE + DATA that is to be inserted.


Take care of the REFERENTIAL CONSTRAINTS.
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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am
No new posts How to calculate an specific transact... lind sh CICS 2 Tue Sep 13, 2016 9:20 pm


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