Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Stored procedures commits

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
gbtech

New User


Joined: 22 Aug 2007
Posts: 3
Location: new york

PostPosted: Fri Aug 24, 2007 11:53 pm    Post subject: Stored procedures commits
Reply with quote

Hi All,

I was asked the following on an interview:

If a client application calls a stored procedure that does an update who does a commit providing that stored procedure is not the one doing it?

Any thoughts on this are appreciated.
Back to top
View user's profile Send private message
References
PostPosted: Fri Aug 24, 2007 11:53 pm    Post subject: Re: Stored procedures commits Reply with quote

ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Fri Aug 24, 2007 11:56 pm    Post subject:
Reply with quote

Hi,

am totally confused on your question, do you intend that the store procedure is not updating the records or something else.

could you provide us more information or expand your sentence.

Cheers
Ashwin
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1343
Location: germany

PostPosted: Sat Aug 25, 2007 12:13 am    Post subject:
Reply with quote

If a client application calls a stored procedure that does an update,
who does a commit providing that stored procedure is not the one doing it? (the commit)
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Sat Aug 25, 2007 12:13 am    Post subject:
Reply with quote

Hi,


I assuming your question as your Store procedure is not updating as expected.

First Check whether the DDL declarations for the store procedure are as per your requiremnt.

And if you are testing your SP (stored Procedure) using batch then check the calling program passing values (Inputs you pass) and declarations.

If everything is ok, so you have to place the display statments before execution of that SQL and after that. check the SQL code.

And remember SP can't be debugged using a Debugging tools. Only option is placing displays.

Hope this Helps

Cheers
Ashwin
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 111
Location: Salem, OR

PostPosted: Sat Aug 25, 2007 3:41 am    Post subject: Reply to: stored procedures commits
Reply with quote

To get back on track of your original question, I would have answered, "When the stored procedure returns control to the calling module." and prayed that I was right!
Back to top
View user's profile Send private message
gbtech

New User


Joined: 22 Aug 2007
Posts: 3
Location: new york

PostPosted: Sat Aug 25, 2007 3:44 am    Post subject: Reply to: stored procedures commits
Reply with quote

I have assumed from the interview question that the stored proc was called from a non-mainframe application (i.e. not from CICS where one could do a syncpoint or a batch program where one could do an exec sql commit). Then if the stored proc does an update who issues a commit?
Back to top
View user's profile Send private message
stodolas

Senior Member


Joined: 13 Jun 2007
Posts: 648
Location: Wisconsin

PostPosted: Sat Aug 25, 2007 4:13 am    Post subject:
Reply with quote

Doesn't the commit happen implicitly on the completion of the stored procedure?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1343
Location: germany

PostPosted: Sat Aug 25, 2007 4:38 am    Post subject:
Reply with quote

Finally, thank you Steve............
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1