View previous topic :: View next topic |
Author |
Message |
Narsimha Beginner
Joined: 03 Dec 2002 Posts: 27 Topics: 14
|
Posted: Thu Jan 16, 2003 9:24 am Post subject: DB2 replace while loading |
|
|
Hi,
I want to update the rows which are already present and Insert the new records in the Db2 table. Is there anyway to do so? If so, please provide me the details or any JCL is appreciated.
Thanks,
Narsimha |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Jan 16, 2003 9:37 am Post subject: |
|
|
Narsimha,
There are many ways to do.
1.You can first issue a delete statement in Batch using DSNTEP2 for all the keys you want to update and then do a LOAD RESUME for all the keys(both update and new rows).
2. Unload the entire table and run it thru a utility/program to create a LOAD file and perform a LOAD REPLACE.
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
Narsimha Beginner
Joined: 03 Dec 2002 Posts: 27 Topics: 14
|
Posted: Thu Jan 16, 2003 10:00 am Post subject: |
|
|
Hi Kolusu,
Thanks for your reply. I never used these load utilities before, Could you please provide me the JCL or documentation for the above mentioned two ways?
Thanks,
Narsimha |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
|
|