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

Deleting Specific Set of Rows and Replacing with New Rows


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 1020
Location: India

PostPosted: Fri Sep 26, 2008 6:01 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts Deleting a Tape file JCL & VSAM 14
No new posts CA7 deleting files in steps after job... CA Products 4
Search our Forums:

Back to Top