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
 

 

Stored procedures commits

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
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

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

Global Moderator


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

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: 147
Location: Columbia, MO

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

Active Member


Joined: 13 Jun 2007
Posts: 632
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

Global Moderator


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

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm


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