Startup and Shutdown of Code Coverage Daemon


This section describes how the IBM Code Coverage daemon (IDz v. 14+) can be started and stopped at the host. For more details see IBM documentation.

IBM Debug tool consists of two parts: The IBM Debugger that is an installed mainframe component, and the Code Coverage Daemon which is a Java-based server that can run anywhere. When code coverage is triggered by Xatz, Xatz starts a job with a JCL step that will trigger the IBM Debugger to collect code coverage information. This JCL step also contains information about where the code coverage information should be delivered by IBM Debugger. This includes an ip-address, a port and a file directory. IBM Debug will send this information to the ip-address:port. The Code Coverage Collector Daemon can be installed at the host, it can be installed at the Total Test Repository Server or at any other server. It also comes as part if the IDz IDE installation, and code coverage info can be sent directly from the mainframe to the local IDz. This will of course not work for automated tests.

Installing IBM Debug and the Code Coverage Daemon

This is standard installation of IBM software- see the relevant installation section for these products.

Setting up JCL

The Xatz JCL samples contain the JCL needed for initiate IBM Code Coverage Collector. The samples are named CCSTART and CCSTOP and they must be changed to suit your installation requirements. In this section we will look at how it works.

Example of procedure to start headless Code Coverage on z/OS: 

//CCSTART PROC                                                   
//*                                                              
//CCSTART EXEC PGM=BPXBATSL,REGION=0M,TIME=NOLIMIT,PARMDD=PARMIN
//PARMIN  DD *                                                    
PGM /usr/lpp/IBM/idzutil/bin/codecov                             
-startdaemon                                                    
-port=7999                                                      
-zipresult                                                       
-savesource                                                     
-output=/var/topaztst/CC                                        
/*    
//STDENV   DD  *
HOME=/var/topaztst/CCLog
/*                                                                
//STDOUT   DD SYSOUT=*                                            
//STDERR   DD SYSOUT=*                                           
//         PEND
  • The PGM /usr/lpp/IBM/idzutil/bin/ points to the directory where the shell script codecov is placed. This script is used to start or stop the daemon Code Coverage (CC) Collector.
  • The -startdaemon instructs the daemon Code Coverage (CC) Collector to start.
  • The -port <portnumber> defines the portnumber where then Code Coverage (CC) Collector listens for incoming requests. This is free of choice, but must be defined in the Xatz Connections definitions under Code Coverage Daemon for the z/OS system where the daemon Code Coverage (CC) Collector is running.
  • The output parameter defines the name of the directory where the Code Coverage output is to be placed by default. This can be overridden by settings in Xatz Connections definitions.
  • The -zipresult and -savesource parameters must be present.
  • The HOME variable holds the name of the Code Coverage Collector log folder. A subfolder named CC is created by the Code Coverage Daemon under the HOME folder.

Example of procedure to stop headless Code Coverage on z/OS: 

//CCSTOP PROC                                                  
//*                                                            
//CCSTOP EXEC PGM=BPXBATSL,REGION=0M,TIME=NOLIMIT,PARMDD=PARMIN
//PARMIN  DD *                                                 
PGM /usr/lpp/IBM/idzutil/bin/codecov                           
-stopdaemon=7999                                              
/*                                                             
//STDOUT   DD SYSOUT=*                                         
//STDERR   DD SYSOUT=*                                         
//         PEND                                                
//*
  • The PGM /usr/lpp/IBM/idzutil/bin/ points to the directory where the shell script codecov is placed. This script is used to start or stop the daemon Code Coverage (CC) Collector.
  • The -stopdaemon=7999 instructs the daemon Code Coverage (CC) Collector to stop listening at port 7999.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*