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

Can we use Load options together


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sravz chinnu

New User


Joined: 07 Dec 2011
Posts: 26
Location: India

PostPosted: Thu Apr 05, 2012 10:34 am
Reply with quote

Hi All,

Can we use Load options
RESUME YES
REPLACE

together.

I want to replace the rows in DB2 with the updated rows in the flat file.

I am using utility to do LOAD process.

Please let me know this.

Sravani
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Apr 05, 2012 11:24 am
Reply with quote

Is that you wanted updated selected records in table using updated records in file?

You cant make use of load utility directly

If size of the table is less unload it and compare with records in the file and create a fresh load file which needs to be present in the table and use LOAD replace

Or Compare the files and just check for the updated data and use programmatic method to update the table

Or Use Programmatic method to read and update the table ( If file has fewer records)

Or You can explain better about your requirement
Back to top
View user's profile Send private message
sravz chinnu

New User


Joined: 07 Dec 2011
Posts: 26
Location: India

PostPosted: Thu Apr 05, 2012 11:42 am
Reply with quote

Prem,

My requirement is to load new inserts and updates in to the existing table from flat file.

I will have two diffenrent files for inserts aswell as updates. Inserts i am able to do with Resume yes option in LOAD.

Wheni am doing REPLACE option the complete data is being replaced with this new data and losing the old data.

UNLOAD and COMPAring the files may not work inmy case because i have some millions of data.

Please suggest if i can do this any other way.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Thu Apr 05, 2012 11:50 am
Reply with quote

What is the size of the data do you expect in insert and update file?
Back to top
View user's profile Send private message
sravz chinnu

New User


Joined: 07 Dec 2011
Posts: 26
Location: India

PostPosted: Thu Apr 05, 2012 11:54 am
Reply with quote

premkrishnan wrote:
What is the size of the data do you expect in insert and update file?


Around 1 million records.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Apr 06, 2012 10:34 pm
Reply with quote

Hi Sravz,

What you can do is ?
Split INSERT and UPDATE records into separate files, if possible.
Load the insert and Write a program to read the update file and update it in DB2.

or

Do a combo using MERGE statement ?

Thanks,
Sushanth
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Apr 07, 2012 12:00 am
Reply with quote

Hi Bobby,

Good to "see" you've returned icon_smile.gif

d
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Mon Apr 09, 2012 8:44 am
Reply with quote

Thanks d.sch.
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 Load new table with Old unload - DB2 DB2 6
No new posts How to load to DB2 with column level ... DB2 6
No new posts REASON 00D70014 in load utility DB2 6
No new posts DB2 Load - Sort Or order BY DB2 1
No new posts DB2 Load - NUMRECS DB2 3
Search our Forums:

Back to Top