Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we use Load options together

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Can we use Load options together
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

Moderator


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

PostPosted: Thu Apr 05, 2012 11:24 am    Post subject:
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    Post subject:
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

Moderator


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

PostPosted: Thu Apr 05, 2012 11:50 am    Post subject:
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    Post subject:
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: 1013
Location: India

PostPosted: Fri Apr 06, 2012 10:34 pm    Post subject:
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

Site Director


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

PostPosted: Sat Apr 07, 2012 12:00 am    Post subject: Reply to: Can we use Load options together
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: 1013
Location: India

PostPosted: Mon Apr 09, 2012 8:44 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm
No new posts Copybook structure in Load module Vai123 COBOL Programming 7 Fri Sep 16, 2016 8:29 pm
This topic is locked: you cannot edit posts or make replies. ERROR WHILE SUBMITTING LOAD JOB ANURADHA NEELAKANTAN JCL & VSAM 12 Thu Aug 25, 2016 11:50 am
No new posts DB2 Unload format options Susanta DB2 2 Fri Aug 12, 2016 5:42 pm
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us