IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Commit of a DB2 update from a calling program


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Fri May 21, 2010 11:29 am
Reply with quote

Hi,

I have a cobol program say PROG A which updates records in a VSAM file. It calls a DB2 program which updates a DB2 table for this record.

If the calling program PROG A updates a record in the VSAM file, and calls the DB2 program. Now after the DB2 program when the control goes over to PROG A, will the commit happen before the control goes to PROG A or will the commit happen at the end of the program?
Sorry if this is a repost.
Back to top
View user's profile Send private message
mallik4u

New User


Joined: 17 Sep 2008
Posts: 75
Location: bangalore

PostPosted: Fri May 21, 2010 4:19 pm
Reply with quote

hi,

Where is the COMMIT coded. Is it in calling program or called program?
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Fri May 21, 2010 4:25 pm
Reply with quote

I am sorry, I didnt mention that earlier, but I meant if the commit is not coded at all.
Back to top
View user's profile Send private message
mallik4u

New User


Joined: 17 Sep 2008
Posts: 75
Location: bangalore

PostPosted: Fri May 21, 2010 4:41 pm
Reply with quote

i think data will get updated permanently once the control goes back to the calling program. This might not be true for CICS programs.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri May 21, 2010 5:43 pm
Reply with quote

I think not. so now hiravibk doesn't have a clue
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri May 21, 2010 8:53 pm
Reply with quote

Hello,

Running a test or 2 comes to mind. . .

Let us know what happens when you run some tests. . .
Back to top
View user's profile Send private message
Gijz

New User


Joined: 27 Nov 2007
Posts: 9
Location: The Netherlands

PostPosted: Fri Jun 11, 2010 8:04 pm
Reply with quote

At the (normal) end of prog A, assuming prog A is the main program. This is true for batch as well as for CICS.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts After newcopy the CICS program user f... CICS 7
No new posts Starting a CICS Transaction from a Th... CICS 0
No new posts Problem moving a cobol program into E... COBOL Programming 3
No new posts Can BPXBATCH update TAPE file COBOL Programming 3
No new posts Error to invoke MPP program through B... IMS DB/DC 4
Search our Forums:


Back to Top