View previous topic :: View next topic
|
Author |
Message |
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
Hi All,
I would like to know does Cobol Issues a implicit Commit when a Cobol-DB2 Subprogram returns control back to mail program.
My requirement as below:
1. Read an Input file in Main program and insert file record in a table by
calling a subprogram.
2. Now my subprogram failed for 2nd record so as per my understanding
1st Inserted record will roll back
3. But when I tried restart the program it gave me -803 for the 1 st
record and the program failed again
Would anyone please let me know the reason behind this or provide any documentation about this..
Thanks in advance
Chandan |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Returning from a called module does not issue a commit.
Sounds like there is something amiss with the code.
Look for other commits in the code. |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Did the program abend or terminate?
Rollback will occur only if the program abends. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
2. Now my subprogram failed for 2nd record so as per my understanding
1st Inserted record will roll back |
what do you mean by failed?
and here are some links about COMMIT
but, based on your quote, your problem is not with the commit,
but your interpretation of failed |
|
Back to top |
|
|
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
Hi Guys,
Sorry for the late reply..
I have come across similar issue again..
Here I am reading the input file and Inserting record in table and whenever there is a DB2 error I am causing an intensional SOC7 error.
But surprisingly the DB2 records processed prior to Abend not getting roll back and my input file also got deleted. I have kept the disposition as (OLD,DELETE,KEEP) so that when there is an Abend file will be kept..
When I digged more on this I observed that the IKJEFT01 step in which I am processing the records gives a return code of 12. So that that particular step got executed normally but with return code as 12 and it caused file to delete as well as record prior to Abend got processed.
Would anybody help me why IKJEFT01 step giving return code as 12 in case of a DB2 error?
Also Is there a way to return the "real" abend code
Thanks in Advance,
Regards,
Chandan |
|
Back to top |
|
|
chandan.inst
Active User
Joined: 03 Nov 2005 Posts: 275 Location: Mumbai
|
|
|
|
Hi All,
I tried to get some more info on this following is the link for the same
billlalonde.tripod.com/stupid.htm
THis is solving my issue by using IKJEFT1A..but still I will be very thankful if I come to know is there any way to get real Abend code using IKJEFT01
Regards,
Chandan |
|
Back to top |
|
|
|