Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Commit in COBOL-DB2 Subprogram

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Fri Nov 06, 2009 10:31 am    Post subject: Commit in COBOL-DB2 Subprogram
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Nov 06, 2009 10:37 am    Post subject:
Reply with quote

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
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Fri Nov 06, 2009 1:30 pm    Post subject:
Reply with quote

Did the program abend or terminate?

Rollback will occur only if the program abends.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Fri Nov 06, 2009 5:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Fri Feb 12, 2010 3:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Fri Feb 12, 2010 4:13 pm    Post subject:
Reply with quote

Hi All,

I tried to get some more info on this following is the link for the same

http://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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us