Friday, January 29, 2010

CICS FAQs

CICS FAQ’s:-

CICS FAQS

Question: what is difference between call and link?
Answer: In case of call, whenever you do changes to the called program you need to compile the calling program also. In case of link, it is not needed.

Question: what are the differences between dfhcommarea and tsq?
Answer: both are used to save data among tasks. but 1.commarea is private to that transaction only . like every transaction has its own commarea created by cics as soon as the transaction is initiated . however tsq , if tdq is known can be accessed by other transactions also 2.commarea length is s9(4) comp ie 65k . but tsq can have any length. 3.commarea is available only during the transaction is running. tsq if created with auxiliary option resides in aux memory and available even if main memory crashes. 4. normally commarea is used to tranfer data from one task to another while tsq is used widely within the task as a scratch pad.

Question: What is Communication Area?
Answer: Communication Area is used to pass data between the programmer between the task.

Question: Which of the following statements correctly describe the syntax of CICS command language?
Answer:

1. If an EXEC CICS command must be continued onto a second line a hyphen (-) must be coded in column 7 of the continued line.

2. If an EXEC CICS command must be continued onto a second line an 'X' must be coded in column 72 of each line to be continued.

3. An EXEC CICS command CANNOT be coded within a COBOL IF statement, between the IF command and the period (.) ending it.

4. The END-EXEC delimiter is optional and never needs to be placed at the end of a CICS command.

5. The options specified within an EXEC CICS command can be in any order. For example 'EXEC CICS SEND FROM(MSG1) LENGTH(30) END-EXEC' can also be coded
'EXEC CICS SEND LENGTH(30) FROM(MSG1) END-EXEC'

Question: .A CICS program ABENDS with an ASRA ABEND code. What is its meaning?
Answer:

1. A link was issued to a program whose name does not exist in the PPT (Program Processing Table).

2. A program attempted to use a map that is not defined in the PCT (Program Control Table).

3. A security violation has occurred. The operator is not defined with the proper authority in the SNT (Sign-on Table) to use a particular file.

4. A program interrupt (0C0 or 0C1 or 0C2 or ...) has occurred in a CICS program.

5. An I/O error has occurred when attempting to use a VSAM file from a CICS program

Question: Which of the following commands, when issued by 2 different programs running at the same time, will prevent simultaneous use of resource 'SINGLE'?
Answer:

1. EXEC CICS PROTECT RESOURCE('SINGLE') LENGTH(6) END-EXEC.

2. EXEC CICS HOLD RESOURCE('SINGLE') LENGTH(6) END-EXEC.

3. EXEC CICS TASK SINGLE('SINGLE') LENGTH(6) END-EXEC.

4. EXEC CICS EXCLUSIVE RESOURCE('SINGLE') LENGTH(6) END-EXEC.

Question: How can you accomplish braykpoint in intertest?
Answer: U-for uncondishional braykpoint, C-for conditional brakepoint,and A-for automatic brakepoint

Question: how many ways are there for initiating a transaction? what are they?
Answer: There are six ways in initiating a transaction. they are as follows.

1. embedding four character transid on the top left most corner of the screen.

2. making use of EXEC CICS START TRANSID ( )

3. making use of EXEC CICS RETURN TRANSID ( )

4. By defining the transid in DCT ( destination control table) to enable ATI (AUTOMATIC TASK INITIATION)

5. Making use of PLT ( program list table)

6. By associating four character transid in PCT (program control table)

Question: which type of TDQ is read destructive?
Answer: intrapartition tdq is read destructive. extrapartition tdq is not read destrctive.

Question: The error code aeiv?
Answer: this is the error code for length, if length of the source data is more than the receiving field, this error will occur. this is the correct answer, previously i mentioned it as program id error. sorry for the wrong information.

Question: WHAT U MEAN BY AEIV?
Answer: THIS IS THE ERROR CODE GIVEN BY THE SYSTEM, IT MEANS PROGRAM ID ERROR.

Question: WHAT IS THE SIZE OF COMMAREA
Answer: THE DEFAULT COMMAREA SIZE IS 65K.

Question: What is ASRAABEND in CICS?
Answer: It occurs when program interuption takes place.e.g.: when alphanumeric string moved to numeric data item OR when arithmetic calculations performed on nonnumeric data item OR when an attempt made to read an occurance of a table beyond the defind occurances.

Question: What is a two Phase commit in CICS?
Answer: This occurs when a programmer Issues a Exec CICS Syncpoint command. this is called two phase because CICS will first commit changes to the resources under its control like VSAM files. and the DB2 changes are committed. Usually CICS signals Db2 to complete the next phase and release all the locks.

Question: Answer to ANON's question, diference between TSQ & TDQ
Answer: TDQ is read destructive, TSQ is not. TSQ can be created dynamically, TDQ cannot be created dynamically. TSQ is temporary in nature (i.e., it will be deleted when the program finishes execution, unless it is made permanent by making a entry in the Temporary Storage Table), TDQ is not. Hope this will suffice

Question: What is ENQ in CICS?
Answer: If any one want to restrict Trans-Id to single user, enter trans-id with ENQ. It won't allow any one else to use the same trans-id.

Question: In SYMBOLIC Cursor Positioning after moving -1 to the length field also the cursor is not positioned in that particular field. Give reasons?
Answer: You have to explicitly specify the word CURSOR between your EXEC CICS and END-EXEC in the program.

Question: What does EIB mean?
Answer: The EIB is the EXECUTIVE INTERFACE BLOCK. It is not the EXECUTE INTERFACE BLOCK. All TP monitors or transaction processors are know as EXECUTIVEs as they carry out process on behalf of a program module. CICS and DB2 are excutives.

Question: How many exceptional condition can be given in a HANDLE CONDITION?
Answer: Max. of 12 exceptional conditions can be given in a single HANDLE CONDITION.

Question: What command do you issue to delete a record in a transient data queue ?
Answer: READQ TD, the read is destructive. Yes it is correct but there is a restriction. U can deletethe records sequentially.. For example if one want to delete 10 th record directly it is not possible with this..

Question: How do you access the records randomly in TSQ?
Answer: By specifying the ITEM option

Question: What command do you issue to delete a record in a transient data queue?
Answer: READQ TD, the read is destructive.

Question: WHAT ARE DIFFERENT WAYS OF INITIATING TRANSACTION IN CICS
Answer: WE CAN INITIATE CICS TRANSACTION

1. BY GIVING TRANSACTION ID

2. BY GIVING CICS START COMMAND

3. AUTOMATIC TASK INITIATION.

Question: What is the difference between LINK and XCTL ?
Answer: The XCTL command passes control to another program, but the resources requested by the first program may still be allocated. A task does not end until a RETURN statement is executed. While in LINK command, program control resumes its instruction following the LINK parameter. The disadvantage of LINK is that it requires that both the calling program and the called program remain in main memory even though both are no longer needed.

Question: What is the difference between CICS Program Control Table (PCT) and CICS Processing Program Table (PPT) ?
Answer: PCT contains a list of valid transaction ID. Each transaction ID is paired with the name of the program ,CICS will load and execute when the transaction is invoked. On the other hand, PPT indicates each program's location which pertains to a storage address if the program has already been loaded or a disk location if the program hasn't been loaded. PPT will also be used to determine whether it will load a new copy of the program when the transaction is invoked.

Question: What are the 3 common ways to create maps?
Answer: The first way is to code a physical map and then code a matching symbolic map in your COBOL program. The second way to create a physical map along with a matching symbolic map is to code only the physical map using the &SYSPARM option, CICS will automatically create a member in a COPY library. And the third way is to use a map generator such as SDF (Screen Definition Facility)

Question: What is Quasi-reentrancy?
Answer: There are times when many users are concurrently using the same program, this is what we call MultiThreading. For example, 50 users are using program A, CICS will provide 50 Working storage for that program but one Procedure Division. And this technique is known as quasi-reentrancy

Question: What is the difference between a physical BMS mapset and a logical BMS mapset?
Answer: The physical mapset is a load module used to map the data to the screen at execution time. The symbolic map is the actual copybook member used in the program to reference the input and output fields on the screen.

Question: How To Set MDT(Modified Data Tag) Thru Application Program?(Dynamically).
Answer: You have to move the following macro DFHBMFSE to the Attribute field of that particular Variable.
Question: What CICS facilities can you use to save data between the transactions?
Answer: COMMONAREA, TSQ & TDQ.

Question: How would you release control of the record in a READ for UPDATE?
Answer: By issuing a REWRITE,DELETE, or UNLOCK command or by ending the task.

Question: How would you release control of the record in a READ for UPDATE?
Answer: By issuing a REWRITE,DELETE, or UNLOCK command or by ending the task.

Question: What is the difference between a RETURN with TRANSID and XCTL ?For example prog. A is issuing REUTRN with TRANSID to prog B. Prog A. is issuing XCTL to prog B.
Answer: In RETURN with TRANSID the control goes to the CICS region and the user have to transfer the control to prog. B by pressing any of the AID KEYS.In XCTL the control is directly transfer to prog. B.

Question: What is the maximum number of exceptions that can be specified with a single HANDLE CONDITION command in CICS ?
Answer: SIXTEEN (16)

Question: WHAT WILL BE THE LENGTH OF THE EIBCALEN ,IF THE TRANSACTION IS USED TO CICS FIRST TIME?
Answer: THE LENGTH WILL BE 0(ZERO)
.
Question: WHAT IS DFHEIBLK?
Answer: DFHEIBLK is Execute Interface Block. It is placed in the linkage section automatically by CICS translator program. It must be the first entry in linkage section. CICS places values prior to giving control to the program and we can find almost any information about our transaction.

Question: What is the difference between the XCTL and LINK commands?
Answer: The LINK command anticipates return of control to the calling program, theXCTL command does not. Return to the calling program will be the result of the CICS RETURN command, specifying TRANSID(name of the calling program).

Question: What CICS command would you use to read a VSAM KSDS sequentially in ascending order?
Answer: First issue a STARTBR(start browse), which will position the browse at the desired record. Retrieve records by using subsequent READNEXT commands. Indicate the end of sequential processing with the ENDBR command. If the generic key is specified in the STARTBR command positioning in the file will be before the first record satisfying the generic key.For reading in descending order use the READPREV instead of READNEXT.

Question: What is the difference between pseudo-conversational and conversational?
Answer: Pseudo-conversational will start a new task for each input. By coding a CICS RETURN command specifying TRANSID(itself). Conversational will have an active task during the duration of the data entry.

Question: What is the COMMAREA(communications area)?
Answer: An area used to transfer data between diffrent programs or between subsequent executions of the same program. Needs to be defined in the Linkage Section.

1 comment:

ankit Bagdi said...

Thanks a lot. Those are very common and useful set of questions