View previous topic :: View next topic |
Author |
Message |
nadh Intermediate
Joined: 08 Oct 2004 Posts: 192 Topics: 89
|
Posted: Wed Aug 03, 2005 1:16 am Post subject: copy pending status |
|
|
Hi,
I have searched for this but not successful.
can anyone pls. explain about what is copy pending status. when will it occur.
second. i have a batch file which is going to insert or update huge records. 4 tables are involved in the process. when should i use commit when successfull or rollback. is it after every insert or update or end of the program. pls clarify.
Thanks
nadh |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Wed Aug 03, 2005 6:56 am Post subject: |
|
|
Nadh,
search this manual for "copy-pending"
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNUGH10/CCONTENTS?DT=20010216104113
Quote: |
second. i have a batch file which is going to insert or update huge records. 4 tables are involved in the process. when should i use commit when successfull or rollback.
|
Usually when performing Insert/update statements it is recommeded that you commit after every 2000 records. ie. 2000 inserts and for updates you need to take into account of count found in sqlerrd(3) which will contain the count of actual no: of rows that were updated.
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
schintala Beginner
Joined: 18 May 2005 Posts: 108 Topics: 31 Location: USA
|
Posted: Wed Aug 03, 2005 7:49 am Post subject: |
|
|
Copy Pending usually seen when we load the table. It can also be noticed during image copy when the job fails in between.
It would be better to commit at the end of the program. |
|
Back to top |
|
|
bonnie_mathew Beginner
Joined: 05 Aug 2005 Posts: 8 Topics: 0
|
Posted: Sat Aug 06, 2005 12:12 am Post subject: |
|
|
Copy pending happens when loading a table from file. This can be avoided by giving LOG YES in the syspunch dataset instead of LOG NO. And once the table goes into copy pending status it can be brought to normal state by using a LOAD REPLACE with LOG YES.
And for committing in program it is better to commit every 2000 or 3000 records. And you can save the commit count is another flat file so that if an error occurs and you have to restart you can read this count and process from that record. |
|
Back to top |
|
|
|
|