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 replace while loading

 
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: Thu Jan 16, 2003 9:24 am    Post subject: DB2 replace while loading Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jan 16, 2003 9:37 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Narsimha
Beginner


Joined: 03 Dec 2002
Posts: 27
Topics: 14

PostPosted: Thu Jan 16, 2003 10:00 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jan 16, 2003 10:22 am    Post subject: Reply with quote

Narsimha,


Running DSNTEP2

LOAD

Examples of LOAD Utility

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