Running code coverage in headless mode using a daemon allows
you to start a daemon listener on one machine and connect a remote
debug session to it, directing code coverage output to a specified
or default directory. This is ideal for running code coverage on programs
that reside on different machines in a network without having to connect
to the UI workbench daemon. The results will be stored by date in
the root of the user's home directory under the CC folder.
About this task
Running code coverage in headless mode using a daemon
allows you to start a daemon listener on one machine and connect a
remote debug session to it, directing code coverage output to a specified
or default directory. This is ideal for running code coverage on programs
that reside on different machines in a network without having to connect
to the UI workbench daemon. The results will be stored by date in
the root of the user's home directory under the CC folder.
Note: Daemon
mode is required to run code coverage of CICS transactions on AIX/Linux.
Note: Code
coverage results will be stored by date in the root of the user's
home directory under the CC folder.
Procedure
- Begin by starting a code coverage daemon. The daemon will
assign a port number and echo it on the console, and then wait for
a connection.
$ codecov -startdaemon

Note: You can specify a specific port by adding
"=" and the port number or range of port numbers after the -startdaemon
option
Note: You can start multiple daemons each having different
options, so long as unique port numbers are used.
- From a second machine, start a remote debug connection
to the machine on which you started the daemon and using the port
number specified in Step 1.
$ irmtdbgc -qhost=<daemon_host>:<daemon_port> <program_name>

- When Code Coverage has completed, a message will appear
indicating the results of the code coverage run.
