MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DB2 LOAD Utility

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Narsimha
Beginner


Joined: 03 Dec 2002
Posts: 27
Topics: 14

PostPosted: Tue Mar 04, 2003 1:01 am    Post subject: DB2 LOAD Utility Reply with quote

Hi,

Please find the following scenario.

If there is a table with 100 rows, and I want to modify some 20 rows in the table. using Load utility in the following way

1)I will unload the table
2)Delete the records that are not going to be updated and keep the records which are to be updated in the unloaded file.
3)Modify the records in the unloaded file(not the keys)
4)Load the table with the modified file, the table should get updated with the records that are modified in the file.

Is there any option in Load utility to perform the above steps?

( As far as I know LOAD REPLACE will load all the records and LOAD RESUME will append the records. But Is there any option in LOAD to performthe above steps)

Thanks,
Narsimha
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Mar 04, 2003 6:35 am    Post subject: Reply with quote

Narsimha,


Since your rows to be modified are less compared to the total no: of rows, i would take this approach.

option1 :

Delete the rows which you want to modify using a batch jcl.
Load RESUME the new modified as new rows.

Option 2:

Generate Sql UPDATE statements for the 20 rows to be modified and run it in batch

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group