View previous topic :: View next topic
|
Author |
Message |
jckraheja
New User
Joined: 19 May 2008 Posts: 13 Location: Pune
|
|
|
|
Hi All,
I am preparing for the interview. Following are some of the questions asked by the interviewer. It would be great if anyone help me to find out the answers.
1.Practical example where the start and retrieve commands are used?( I am not able to find any practical example ... even though I know the purpose of these commands...;( )
2.How to avoid the deadlock in CICS? If any CICS transaction updates the tables and at the same time if the batch time also tried to access the table then will it result in deadlock?
3.A task is generating report on transaction.what will be your consideration for it to run on holiday? Can we do it ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
1. At the top of the page is a link to "IBM Manuals". Suggest you look thoroughly in the CICS CICS TS/zOS Language Reference and the CICS TS/zOS Programming Guide. If you find something that is not clear in the documentation, post what you found and your doubt. Someone will be able to clarify.
2. If the code is written properly/consistently, there will be no deadlocks - either within cics or between cics and batch.
3. If the system/organization already has a "calendar" function that includes holidays it will be rather simple. If not something would need to be designed and used to determine holidays. |
|
Back to top |
|
|
jckraheja
New User
Joined: 19 May 2008 Posts: 13 Location: Pune
|
|
|
|
Thanks for the reply. Please find out my comment.
1. I have gone through the manuals but not able to find out any real time example for those commands. Though I know one i.e. we can use these commands to implement transaction routing mechanism similarly I am trying to find out the other examples.
2.Yes I completely agree. Just a small doubt say online transaction take a lock on table and updating the records and in meantime batch program also try to access the same table then what happens with the batch program? Will batch program will wait ? Please clarify.
also anyone help me to how to determine the commit frequency in CICS-DB2 program.Keeping performance consideration in mind.( I had a search on forum but only able to find how to perform commit after certain frequency but not able to find determining the commit frequency ) |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
also anyone help me to how to determine the commit frequency in CICS-DB2 program. |
A commit should be issued after successfully completing a "logical unit of work". Often this can be a transaction.
In a cics application i know of no reason to figure out how frequently tocommit.
If a cics transaction locks a row and batch wants to update it also, the batch job will wait - unless the wait timeout is exceeded. Which should not happen as cics transactions should never lock for very long. If the "second" process does not intend to update the same locked row, there migt not be any wait. |
|
Back to top |
|
|
jckraheja
New User
Joined: 19 May 2008 Posts: 13 Location: Pune
|
|
|
|
Thanks for all your help !!
Regarding Commit, say we have COBOL-DB2 program where program expecting to do thousands of update then in that case how to determine the commit frequency ? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
jckraheja wrote: |
Regarding Commit, say we have COBOL-DB2 program where program expecting to do thousands of update then in that case how to determine the commit frequency ? |
Looking in to the program-code directly and the documentation available sounds to be quick starting point. |
|
Back to top |
|
|
jckraheja
New User
Joined: 19 May 2008 Posts: 13 Location: Pune
|
|
|
|
Thanks Anuj for the reply !!
Could you please be more elaborative on the same. Are there any set of rules that needs to be consider to choose the commit frequency keeping performance in mind ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
People responsible for the systems i support very rarely permit a checkpoint "in the middle" of a cics transaction.
Just what would you do if a transaction was 72% committed and abended?
If someone believes a cics transaction needs to be committed every "n" updates, it is probably a design error and trying to get around locking too many resources in one transaction. |
|
Back to top |
|
|
jckraheja
New User
Joined: 19 May 2008 Posts: 13 Location: Pune
|
|
|
|
Thanks dick !!
Thats true for the online but for batch I am sure we can commit the work after processing say nth records then in that case what would be commit frequency ? |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Quote: |
what would be commit frequency ? |
Depends on the amount of work being done for each record, length of run etc. For example - you may process, say 10,000 records, and it takes 2 minutes - why checkpoint at all? Another process may run for an hour with the same records so a checkpoint or so would reduce 'lost' time on a restart. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Again, if the job was 72% committed and then there was an abend, how would the job know where/how to begin. . .?
Just throwing commits here and there (even if by some count/frequency scheme) is pretty much a waste and leads to confusion.
If i was asked this in an interview, my answer would be that my teams do not do this any more. . . While this works for me, they may not expect this from a person with limited experience. . . |
|
Back to top |
|
|
|