I am a seasoned cobol programmer who is new to Oracle. My cobol experience is in the Unisys arena. ie I have been using a DMSII database (uses pointers).
I have a basic understanding of Oracle and cursor but I am having difficulty understanding how to write a batch update program.
For example:
I have a table that contains 10 rows (table A.) Each row in table A will be added to another table (table B) and the original row (in tabel A) will be updated with todays date. If there are any errors adding the row to table B the transaction is aborted and the program continues with the next row in table A.
Basically the program is reading a table of recurring invoices that are posted the actual invoice table.
If I use the same logic with Oracle the cursor is closed and the program ends abnormally.
If I was to write this program from scratch how would I do it? Read rows from table A to a temp file and then read each record from the temp?
Any help with this would be appreciated.
Also, if any one could direct me to sample programs it would be greatly appreciated.
Thanks in advance
I have a basic understanding of Oracle and cursor but I am having difficulty understanding how to write a batch update program.
For example:
I have a table that contains 10 rows (table A.) Each row in table A will be added to another table (table B) and the original row (in tabel A) will be updated with todays date. If there are any errors adding the row to table B the transaction is aborted and the program continues with the next row in table A.
Basically the program is reading a table of recurring invoices that are posted the actual invoice table.
If I use the same logic with Oracle the cursor is closed and the program ends abnormally.
If I was to write this program from scratch how would I do it? Read rows from table A to a temp file and then read each record from the temp?
Any help with this would be appreciated.
Also, if any one could direct me to sample programs it would be greatly appreciated.
Thanks in advance