View previous topic :: View next topic
|
Author |
Message |
BhavanaS
New User
Joined: 20 Feb 2008 Posts: 17 Location: India
|
|
|
|
I need to add records to a table which already has some rows present in it.I have to do this using the load jcl. One method which I could think of is
1. Do the unload for the table first.
2.Append the new records to this unload file.
3. Delete the existing data in the table
4.Load the table using the appended unload file.
Can any one suggest a better approach where probably I can avoid the delete step?
Thanks in advance, |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
You can choose whether you want to add the new data to the existing data or replace the existing data, if the table space already contains data. |
|
Back to top |
|
|
BhavanaS
New User
Joined: 20 Feb 2008 Posts: 17 Location: India
|
|
|
|
The table space already has some records and I now want to add some more records to it. In that case how will i append the table in the JCL?
Thanks in advance, |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Which load utility you are using?
If it is BMC load plus, it avoids adding rows and keys to the table spaces and indexes if they cause duplicate keys in a unique index, so that the rows and keys do not need to be deleted later in the LOAD phase... |
|
Back to top |
|
|
BhavanaS
New User
Joined: 20 Feb 2008 Posts: 17 Location: India
|
|
|
|
I am using DSNUTILB in the load jcl. Its like I have loaded the table for some employee ids and now I want to append it for remaining employee ids. So I guess there will not be an issue of duplicate keys.
Thanks, |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Have you tried looking the DB2 Utilities manual. |
|
Back to top |
|
|
|