תשובה: [DB2-L] Separate UOW from COBOL batch program zOS

Michael Kaplan

תשובה: [DB2-L] Separate UOW from COBOL batch program zOS
Hello, Jantie,

It is possible, but really too complicated. The point is that you have to work under different TCB, making Connect / Disconnect.
Having your COBOL program as the main program - it is impossible, however, if you have Assembler Program, you can run you Cobol program as routine, then go to other program ( if COBOL, it should be translated with THREAD option), make CONNECT / DISCONNECT and then come back to your first COBOL program, all this under supervising of Assembler Program, providing each COBOL program run under different TCB.

Now, it is matter of how many times you have to make this INSERT operation
( because multiply CON/DIS is really nightmare for BATCH processing ) and whether it must be synchronous with the main logic.

If INSERT operation is not to be synchronous, then instead of SQL INSERT, just write insert data to some non-recoverable source ( i.e. VSAM ESDS), finish you main application and then run other application to insert this data to DB2.
If INSERT must be synchronous, try to postpone inserting as the last statement in UOW.

If you provide more info about your application in terms of data processing, it may be easier to find more specific advice.

Michael Kaplan
DBA DB2
Leumi Card

-----הודעה מקורית-----
מאת: DB2 Data Base Discussion List [mailto:[login to unmask email] בשם Jan tje
נשלח: ו 23 ינואר 2009 14:50
אל: [login to unmask email]
נושא: [DB2-L] Separate UOW from COBOL batch program zOS - Is it possible

Dear Listers,

zOS 1.8 - DB2 8

I have the need to commit an insert to a given table without committing the
work done on other tables. The program is written in COBOL and runs in batch.

Now, I know that it is not possible to commit only part of a unit-of-work
(UOW). It would not be a unit, would it?

So, a wild idea spurred: let's leave the current UOW, create a new, separate
UOW, insert the data in the one table and commit only this separate UOW.
Then return to the original UOW to continue the work there.

Only, I have no clue on how I can do just that... Do you?

Thanks for any and all suggestions.

Cheers,

Jantje.

______________________________________________________________________

* IDUG 2009 Melbourne, Australia * 18-20 March * http://IDUG.ORG/Events *
______________________________________________________________________




IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html

______________________________________________________________________

* IDUG 2009 Melbourne, Australia * 18-20 March * http://IDUG.ORG/Events *
______________________________________________________________________




IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html