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
 

 

DB2 Interview question at HSBC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
prasadk432

New User


Joined: 22 Dec 2007
Posts: 9
Location: Gurgaon

PostPosted: Wed Feb 06, 2008 4:41 pm    Post subject: DB2 Interview question at HSBC
Reply with quote

In cursors after fetch statement in procedure division if you code count() whether the data updated in latest query can be accessible or not.
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: Wed Feb 06, 2008 9:56 pm    Post subject:
Reply with quote

Hello,

Please re-word your question.

The posted question is not clear (at least not to me icon_smile.gif ).

Please keep in mind that while your question is completely clear to you, it may not be to others who read the question.
Back to top
View user's profile Send private message
prasadk432

New User


Joined: 22 Dec 2007
Posts: 9
Location: Gurgaon

PostPosted: Tue Feb 12, 2008 12:46 pm    Post subject:
Reply with quote

Yes Dick,

I was asked after fetch statement in cursor if you code count statement whether you can access last updated data or not.Please give the solution
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Tue Feb 12, 2008 12:59 pm    Post subject:
Reply with quote

Hi,

You are confused with the Questions.

How can a Fetch stmt will update a table.

or You mean you have declared a cursor with delete and trying to find count the number of rows after delete.


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

New User


Joined: 22 Dec 2007
Posts: 9
Location: Gurgaon

PostPosted: Tue Feb 12, 2008 1:08 pm    Post subject:
Reply with quote

Not like that update stmt would be issued before fetch and that updated data can be accessed after some fetch and count stmt or not.

Now I think it is clear.
Back to top
View user's profile Send private message
ashwinreddy

Active User


Joined: 16 Sep 2004
Posts: 106
Location: Hyderabad

PostPosted: Tue Feb 12, 2008 3:58 pm    Post subject:
Reply with quote

Hi,

Either you update the Table before fetch or after, it doesn't impact the Count in Table.

As far as i know the count will only differ from the original value when you either delete or insert a row.

Hope this Helps!

Cheers
Ashwin
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
This topic is locked: you cannot edit posts or make replies. Walk-in - HSBC Software Development I... Saikat Sengupta Mainframe Jobs 0 Fri May 13, 2016 10:51 am
This topic is locked: you cannot edit posts or make replies. Referral Walk-in - HSBC Software Deve... Saikat Sengupta Mainframe Jobs 0 Wed May 11, 2016 3:58 pm
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm


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