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

Before closing the cursor if you give commit


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

New User


Joined: 04 May 2005
Posts: 25

PostPosted: Wed May 11, 2005 11:59 am
Reply with quote

I am facing this question in an interview

!1)before closing the cursor if you give committ then wht will be the result whether it will save the cursor changes or throw error message?pls reply for this query

2)wht is exactly bind doing in compilation stage?
Back to top
View user's profile Send private message
Ashutosh Shrinet

New User


Joined: 22 Aug 2004
Posts: 10
Location: New Delhi

PostPosted: Thu May 12, 2005 5:32 pm
Reply with quote

hi,
i f u give the commit cursor automatically gets closed.it will save the cursor changes.
Bind is a process that builds ?access paths? to DB2 tables. A bind uses the Database Request Modules(s) (DBRM(s)) from the DB2 pre-compile step as input and produces an application plan. It also checks the user?s authority and validates the SQL statements in the DBRM(s).
Back to top
View user's profile Send private message
narasimharao_koganti

New User


Joined: 26 Apr 2005
Posts: 11
Location: pune

PostPosted: Thu May 12, 2005 9:01 pm
Reply with quote

hi,
before closing the cursor if u commit the cursor will be closed and all the changes made will be saved.

bind in compilation takes DBRM's or packages as input and gives the executable module for SQL statements, i.e., it consists of the access path specified by the optimizer for the SQL statements. u can see this access path by using EXPLAIN.
Back to top
View user's profile Send private message
brain_s390

New User


Joined: 06 May 2005
Posts: 58
Location: Mumbai

PostPosted: Sat May 14, 2005 5:30 pm
Reply with quote

1)before closing the cursor if you give committ then wht will be the result whether it will save the cursor changes or throw error message?pls reply for this query

## Yes COMMIT will save the changes automatically.Additionally if you want to continue updating process after commit then specify CURSOR WITH HOLD option.This clause avoids closing the cursor and repositioning it to the last row processed when the cursor is reopened.

2)wht is exactly bind doing in compilation stage?

## Bind is a process that builds ?access paths? to DB2 tables. A bind uses the Database Request Modules(s) (DBRM(s)) from the DB2 pre-compile step as input and produces an application plan. It also checks the user?s authority and validates the SQL statements in the DBRM(s).Mainly performs two things syntax checking and authorization checking.It binds together all packages into an application plan hence the name BIND.Apart from this bind has optimiser as a subcomponent.Its function is to determine the optimum access strategy.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts Can you give me examples of programs ... CLIST & REXX 22
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts Restart logic by using cursor name in... DB2 1
No new posts Seeking Resolution for SQKCODE -991 o... DB2 2
Search our Forums:

Back to Top