Use CICS® Interdependency
Analyzer (CICS IA) to analyze
what actions the application takes. CICS IA
can report on the transactions and programs for the application, the
EXEC CICS commands in the programs,
the application’s use of resource managers such as DB2®, and the TCBs where the application runs. CICS IA can also identify programs
in the application containing EXEC CICS commands
that are never threadsafe or not always threadsafe, and programs containing
application logic that accesses shared resources and therefore might
not be threadsafe.
About this task
These instructions use the CICS IA
interface that is available through interactive screens at a CICS terminal (the CINT transaction).
You can also perform this task by using the CICS IA plug-in for the CICS Explorer® to operate the controller
and see different views of the data collected by CICS IA. To see the CICS IA plug-in being used, view the demo
Threadsafe Analysis with the CICS Explorer and CICS Tools.
Procedure
- Log on to one of the CICS regions
that you have set up for CICS IA,
and enter CINT to run the CINT transaction
to start CICS IA. The Main Administration Menu is displayed.
- Type the number 2 to select option
2, Configure Region Options, and press Enter. The Region Configuration Menu is
displayed with a list of the CICS regions
that are configured for this CICS IA
instance. Verify that all the CICS regions
used by the application are shown.
- From the Region Configuration Menu,
you can modify the data that CICS IA
collects for each CICS region.
The default options are as specified in the CICS IA control file, CIUCNTL. If
you are planning to analyze an application that is running in a production CICS system, be aware that collecting
data for CICS IA can cause
an increase in response times. Press F3 to exit to the Main Administration
Menu.
- In the Main Administration Menu, type
the number 1 and press Enter. The Operations
Menu is displayed.
- Type the number 1 next to each of
the CICS regions where the
application runs.
- Press Enter to start the CICS IA
Collector in all of the CICS regions
where the application runs.
- Type the number 5 next to one of
the CICS regions where the CICS IA Collector is running, and
press Enter. The statistics for the CICS IA Collector are displayed. When transactions
are running in the CICS regions,
press F5 or Enter to update the statistics and verify that the CICS IA Collector is collecting
data.
- Run the transaction that starts the application. If
you know that the application always takes the same path, running
the transaction once provides the required data. If the application
can take different paths, run the transaction multiple times to ensure
that data is collected for all the paths. When you
can see from the statistics for the CICS IA
Collector that you have collected sufficient data, press F3 to exit
the statistics screen and return to the Operations Menu.
- In the Operations Menu, type the number 2 next
to each of the CICS regions
where the application runs.
- Press Enter to stop the CICS IA
Collector in all of the CICS regions
where you were running it.
- To produce a report showing the actions taken by the application,
in TSO, submit the CIUJCLRP JCL to run the Dependency Reporter. You can view the output from the job at the destination that
you defined in the JCL. The report shows the following
items:
- The transactions that are part of the application.
- The program that each transaction runs.
- The EXEC CICS commands in each program, and relevant options.
- The CICS TCB on which CICS ran each command.
- The resources such as DB2 that
the application accessed, and the CICS TCB
on which each request was made.
- To produce a
report showing whether or not each program in the application has
threadsafe program logic and contains threadsafe CICS commands, in TSO, submit the CIUJTSQ2 JCL
to run the Program Threadsafe report. You can view the
output from the job at the destination that you defined in the JCL. The report shows the following items for each program in the
application:
- The CONCURRENCY attribute in the installed PROGRAM resource definition,
showing whether or not the program is currently defined to CICS as threadsafe.
- The DB2, IMS™, and WebSphere® MQ
calls issued by the program.
- The threadsafe status for each of the EXEC CICS commands issued
by the program. CICS IA identifies
whether the command is threadsafe, not threadsafe, or requires more
investigation.
- Whether the program contains any CICS commands
that give access to shared storage, known as threadsafe inhibitors.
Although some of these commands are themselves threadsafe, they all
give access to global storage areas, so the application logic that
follows these commands and uses the global storage areas must be checked
to see whether or not it is threadsafe.
- Use the information gathered by CICS IA to assess each program in your application:
- For any CICS commands pointed out by CICS IA that give access to shared storage, check that the program includes
synchronization logic to guard against concurrent update of the shared storage. For more information about appropriate threadsafe processing techniques for accessing shared
resources, see Making applications threadsafe. If the program does access shared resources correctly, its program logic is
threadsafe.
- For any EXEC CICS commands
where CICS IA has reported
that the command requires more investigation, check whether the command
is threadsafe in the context of the application. For example,
the EXEC CICS READ command is threadsafe when it
refers to a local file, or a file accessed by function shipping over
an IPIC connection. However, the command is not threadsafe for files
accessed over other types of connection. To check the
exact circumstances in which each EXEC CICS command
is and is not threadsafe, see the reference documentation in the CICS Information Center for the
command. If a command is threadsafe, it will not
cause a switch to the QR TCB when the program is running on an open
TCB.
Remember: Programs can be defined to CICS as threadsafe when they have threadsafe
program logic, but contain EXEC CICS commands
that are not threadsafe. CICS switches
back from the open TCB to the QR TCB when necessary to ensure that
the commands are processed safely. However, TCB switching can affect
the performance of the application. For optimal performance, only
define programs to CICS as
threadsafe when they have threadsafe program logic and use only threadsafe CICS commands.
Results
Any programs in the application that you have verified as having threadsafe program logic
and using only threadsafe CICS commands, are good candidates
for running on open TCBs. For best performance, you should also verify that any user exit programs
in the execution paths used by the programs are also coded to threadsafe standards and defined to
CICS as threadsafe. For more information about user exit
programs in threadsafe applications, see
Multithreading: Reentrant, quasi-reentrant, and threadsafe programs. When you are
confident that a program is suitable to run on an open TCB, you are ready to define it to CICS as threadsafe.