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

Some CICS Interview Questions


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

New User


Joined: 19 May 2008
Posts: 13
Location: Pune

PostPosted: Mon Mar 14, 2011 12:06 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Mar 14, 2011 3:12 am
Reply with quote

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
View user's profile Send private message
jckraheja

New User


Joined: 19 May 2008
Posts: 13
Location: Pune

PostPosted: Mon Mar 14, 2011 8:50 am
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Mon Mar 14, 2011 9:12 am
Reply with quote

Apparently, you didn't look very hard.

Regarding the START and RETRIEVE API's, they can be found in the "Application Programming Reference" (with examples) for your given CICS Version/Release.

Below is the Bookshelf link for CICS/TS 3.2 -

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/DFHASJ00?FS=TRUE

IBM Book Manager Main Page (save in your favorites) -

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/library

Redbooks are a handy resource for all sorts of information (favorites candidate also) -

www.redbooks.ibm.com

Try to put an effort into researching before posting. All of us have to do this plus, you'll reduce the flame factor. icon_eek.gif

As far as the DB2 questions, I can't help you....

Bill
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: Mon Mar 14, 2011 9:53 am
Reply with quote

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
View user's profile Send private message
jckraheja

New User


Joined: 19 May 2008
Posts: 13
Location: Pune

PostPosted: Mon Mar 14, 2011 4:23 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Mar 14, 2011 5:52 pm
Reply with quote

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
View user's profile Send private message
jckraheja

New User


Joined: 19 May 2008
Posts: 13
Location: Pune

PostPosted: Mon Mar 14, 2011 7:25 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Mar 14, 2011 7:46 pm
Reply with quote

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
View user's profile Send private message
jckraheja

New User


Joined: 19 May 2008
Posts: 13
Location: Pune

PostPosted: Mon Mar 14, 2011 10:56 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Mar 15, 2011 12:53 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Mar 15, 2011 2:40 am
Reply with quote

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
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 Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts How to avoid duplicating a CICS Web S... CICS 0
Search our Forums:

Back to Top