FAQs(46 to 60)

46) What is the effect of including the TRANSID in the EXEC CICS RETURN command?

A) The next time the end user presses an attention key, CICS will start the transaction specified in the TRANSID option.

47) Explain how to handle exceptional conditions in CICS.

A) An abnormal situation during execution of a CICS command is called an exceptional condition".

There are various ways to handle these exception conditions:

1. Handle Condition Command: It is used to transfer control to the procedure label specified if the

exceptional condition specified occurs.

2. Ignore Condition Command: It causes no action to be taken if the condition specified occurs in

the program. That is control will be returned to the next instruction following the command which

encountered the exceptional condition.

3. No Handle Option: This option can be specified in any CICS command and it will cause no

action to be taken for any exceptional condition occurring during execution of this command.

4. RESP Option: This option can be specified in any CICS command. If the RESP option is

specified in a command, CICS places a response code at a completion of the command. The

application program can check this code, then proceed to the next processing.

Handle condition:

Invalid handling of CICS error condition within the program causing the looping. Here is one example, most program have EXEC CICS HANDLE CONDTION ERROR(label) or EXEC CICS HANDLE ABEND LABEL(label) to trap any error condition or abend. This type of coding is usually acceptable if they handle the error / abend correctly in their handling paragraph. However, the program often cause another error or abend within the handling routine. In that case, looping or sos will occur. I strong recommend that the following statement should be included in their ERROR handling paragraph.

EXEC CICS HANDLE CONDTION ERROR END-EXEC. It means that from now on, CICS will handle all the errors and will not go back to error handling routine .For HANDLE ABEND, code EXEC CICS HANDLE ABEND CANCEL instead. Please check the application program reference manual for further explanation of these two commands. Besides, not only these two HANDLE will cause the program, other type of error handle might cause loop too. So code the HANDLE command carefully. It is a good program practice to deactivate the error handling by EXEC CICS HANDLE CONDITION condition END-EXEC. Once you know that the program won't need it anymore.

48) What is the function of the EXEC CICS HANDLE CONDITION command?

A) To specify the paragraph or program label to which control is to be passed if the ?handle condition? occurs.

49) How many conditions can you include in a single HANDLE CONDITION command?

A) No more than 16 in a single handle condition. If you need more, then you must code another HANDLE CONDITION command.

50) What is the EXEC CICS HANDLE ABEND?

A) It allows the establishing of an exit so cleanup processing can be done in the event of abnormal task termination.

51) What is the difference between EXEC CICS HANDLE CONDTION and an EXEC CICS IGNORE command?

A) A HANDLE CONDITION command creates a ?go-to? environment. An IGNORE command does not create a go-to environment; instead, it gives control back to the next sequential instruction following the command causing the condition. They are opposites.

52) What happens when a CICS command contains the NOHANDLE option?

A) No action is going to be taken for any exceptional conditional occurring during the execution of this command. The abnormal condition that occurred will be ignored even if an EXEC CICS HANDLE condition exist. It has the same effect as the EXEC CICS IGNORE condition except that it will not cancel the previous HANDLE CONDITION for any other command.

53) When a task suspends all the handle conditions via the PUSH command, how does the task reactivate all the

handle conditions?

A) By coding an EXEC CICS POP HANDLE command.

54) Explain re-entrancy as applies to CICS.

A) Reentrant program is a program which does not modify itself so that it can reenter to itself and continue processing after an interruption by the operating system which, during the interruption, executes other OS tasks including OS tasks of the same program. It is also called a "reenterable" program or"serially reusable" program.

A quasi-reentrant program is a reentrant program under the CICS environment. That is, the quasi-reentrant program is a CICS program which does not modify itself. That way it can reenter to itself and continue processing after an interruption by CICS which, during the interruption, executes other tasks including CICS tasks of the same program. In order to maintain the quasi-reentrancy, a CICS application program must follow the following convention:

Constants in Working Storage: The quasi-reentrant program defines only constants in its ordinary data area (e.g. working Storage Section ). These constants will never be modified and shared by the tasks.

Variable in Dynamic Working Storage: The quasi reentrant program acquires a unique storage area (called Dynamic Working Storage --DWS) dynamically for each task by issuing the CICS macro equivalent GETMAIN. All variables will be placed in this DWS for each task. All counters would have to be initialized after the DWS has been acquired.

Restriction on Program Alteration: The program must not alter the program itself. If it alters a CICS macro or command, it must restore the alteration before the subsequent CICS macro or command.

55) What are the CICS commands available for program control?

A) The following commands are available for the Program Control services:

1. LINK: To pass control to another program at the lower level, expecting to be returned.

2. XCTL: To pass control to another program at the same level, not expecting to be returned.

3. RETURN: To return to the next higher-level program or CICS.

4. LOAD: To load a program.

5. RELEASE: To release a program.

56) How is addressability achieved to the data outside programs working-storage.?

A) The Base Locator for Linkage ( BLL ) is an addressing convention used to address storage outside the Working Storage Section of an application program. If BLL is used for the input commands (e.g.: READ, RECEIVE), it will improve the performance, since the program would be accessing directly the input buffer outside of the program. In order to work as intended, the program must construct BLL based on the following convention:

1). The parameter list must be defined by means of a 01 level data definition in the Linkage Section as the first area definition to the Linkage Section, unless a communication area is being passed to the program, in which case DFHCOMMAREA must be defined first. The parameter list consists of a group of the address pointers, each of which is defined as the full word binary field ( S9(8) COMP ). This is called the BLL cells.

2). The parameter list is followed by a group of 01 level data definitions, which would be the actual

data areas. The first address pointer of the parameter list is set up by CICS for addressing the parameter list itself. From the second address pointer onward, there is a one-to-one correspondence between the address pointers of the parameter list and 01 level data definitions.

3). VS COBOL II provides CICS application programs with a significant improvements in the area of addressability through the special ADDRESS register. Therefore, if an application program is written in VS COBOL II, the program is no longer requires building the BLL cells in the Linkage Section.

57) Explain the various ways data can be passed between CICS programs.

A) Data can be passed between CICS programs in three ways- COMMAREA, TRASIENT DATA QUEUE &

TEMPORARY STORAGE QUEUE.

Data can be passed to a called program using the COMMAREA option of the LINK or XCTL command in a calling program. The called program may alter the data content of COMMAREA and the changes will be available to the calling program after the RETURN command is issued in the called program. This implies that the called program does not have to specify the COMMAREA option in the RETURN command.

If the COMMAREA is used in the calling program, the area must be defined in the Working Storage Section of the program (calling), whereas, in the called program, the area must be defined as the first area in the Linkage Section, using reserved name DFHCOMMAREA.

58) What is the difference between using the READ command with INTO option and SET option?

A) When we use INTO option with the READ command the data content of the record will be moved into the specified field defined in the Working Storage Section of the program. When we use SET option with the READ command , CICS sets the address pointer to the address of the record in the file input / output area within CICS, so that the application program can directly refer to the record without moving the record content into the Working Storage area defined in the program. Therefore, the SET option provides a better performance than the INTO option.

59) Can we define an alternate index on VSAM/RRDS ?

A) No

60) What is the difference between the INTO and the SET option in the EXEC CICS RECEIVE MAP command?

A) The INTO option moves the information in the TIOA into the reserved specified area, while the SET option simply returns the address of the TIOA to the specified BLL cell or ?address-of? a linkage-section.