Q) 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.
Q) 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.
Q) 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.
Q) 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 CONDITIONcommand.
Q) 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.
Q)
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.
Q) 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.
Q)
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.
Q) 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.
Q)
What are the CICS commands
available for program control?
A)
The following
commands are available
for the Program
Conrol 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.
No comments:
Post a Comment