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

cursor with hold- gave commit for every 10000 - job abended?


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumar119119

New User


Joined: 31 May 2010
Posts: 25
Location: Pune

PostPosted: Tue Jul 27, 2010 9:17 pm
Reply with quote

Hi Folks,
Good Evening,

this is L&T Infotech interview question last week

interviwer :

If I use commit for every 10000 rows by "cursor with hold" option, If job abended aftr 10000 rows I restarted job again, Now how the system know the 10000 rows are committed?

me :

when you restart the job 10000 rows already committed, so it starts the execution from 10001 row...

interviewr : No, I know it, But I want how system knows those 10000 rows are committed,


Please friends....help me in this...

Thanks in advance
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jul 27, 2010 9:45 pm
Reply with quote

Hello,

Quote:
If I use commit for every 10000 rows by "cursor with hold" option
I suspect this is not what the interviewer asked. . .

COMMIT has nothing to do with "cursor with hold".

COMMIT has to do with causing updates (insert/update/delete) to be made "permanent".

Your answer is incomplete at best. It will not start from 10001 magically. A restart process is required.
Back to top
View user's profile Send private message
kumar119119

New User


Joined: 31 May 2010
Posts: 25
Location: Pune

PostPosted: Tue Jul 27, 2010 10:56 pm
Reply with quote

Thanks for your reply Dick scherrer,

The thing is he wants to know is how system knows the rows are committed when the job restarted,

Suppose when we give commit for certain check point like for every 10000 rows aftr processing one lakh rows when job abended,
So we again restart the job rows start processing,,

the interviewer asking me how the Database/system knows the one lakh records processed/commited....

please dick if u dnt understand the question ask me,

but i am expecting better answer

Thank you
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jul 27, 2010 11:18 pm
Reply with quote

Hello,

Quote:
please dick if u dnt understand the question ask me,
I understand what you typed and i read, but that may not be what you actually meant. . .

Quote:
but i am expecting better answer
Then you need to change your expectation. . .

Until you gain a much better understanding of checkpoint, there can be no "better answer".

The system does not "know" that 10000 rows were recently updated. The system only knows which rows are now in the database (anything not committed would have been backed out to the last checkpoint (commit)) when the abend occurred.

If there is an intention to restart "in the middle", it must be incorporated into the process. There is nothing that automatically does this - it is part of the design of the appliocation system.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Jul 27, 2010 11:36 pm
Reply with quote

normally I stay out of these type of discussions which should have been
posted in the rookie/beginner/school website.

Satish kumar reddy.T,

had you not prevaricated with your cv/resume
and claimed more knowledge and experience that you obviously do not have,
the interviewer may have not asked a question,
which a more knowledgeable individual would have countered with dialog
concerning the process and the standards employed by the organization,
(which you were in the process of attempting to hoodwink),
and thru this dialog, your conversation would have then lead to an adequate answer.

but you don't and didn't
and then had the misfortune of yet, again, exposing your ignorance,
when Dick was attempting to answer your question,
with the questions that you should have asked the interviewer.
Back to top
View user's profile Send private message
kumar119119

New User


Joined: 31 May 2010
Posts: 25
Location: Pune

PostPosted: Wed Jul 28, 2010 12:11 am
Reply with quote

Hi Dick,
Thanks a lot,

Thanks for the info,
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Wed Jul 28, 2010 12:43 am
Reply with quote

you are welcome from both of us (even if I do speak for Dick).
glad we were of help and able to guide you.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Wed Jul 28, 2010 8:25 pm
Reply with quote

Hello Kumar,

Looks like you are still looking for an answer.

Well, whenever the commit is done, all the updates to the databases till that point get commited. So, if the job abends say at some record after the X commits, then you have to restart the job in such a way (and not the system knows, but you provide the restart logic) that you start apply the process from X*commitfreq + 1 input record.

Hope this helps.
Back to top
View user's profile Send private message
kumar119119

New User


Joined: 31 May 2010
Posts: 25
Location: Pune

PostPosted: Wed Jul 28, 2010 10:09 pm
Reply with quote

Hi Ajay Baghel,

Good Evening,

Your answer totally clarified my doubt,

Thanks a lot for your answer,

And thanks to Dick scherrer and Dick Brenholtz for sharing your valuable time for my question.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Reorg abended with REASON=X'00E40347' DB2 2
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
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