Program Inventory Utility. Compuware Code Coverage
Xpediter/Code Coverage helps you understand the quality of your code and make sure the tests you run are thorough enough to cover every part of it. You'll be able to see which parts of the code are being exercised by your testing, and which are not. This will allow you to fix any potential problems before your application goes live and prevent any costly errors that could disrupt your operations.
Advertisement
Advertisement
13-1
Chapter 13.
Program Inventory Utility
Under CICS, programs to be monitored by Code Coverage must reside in a Program
Inventory file. The Program Inventory Utility allows you to manipulate your Program
Inventory by:
• formatting a Program Inventory file for use
• copying members from one Program Inventory file to another Program Inventory file
• deleting members
• exporting or importing members
• altering the collection status of members
• listing the contents of a Program Inventory file directory
In conjunction with Xpediter/CICS, the population and maintenance of the CICS
Program Inventory file has been extended to run as ISPF dialogs. The ISPF Program
Inventory Maintenance screen can be used in one of two modes: batch or foreground. In
batch mode, discussed in both this chapter and Chapter 12, “CICS Populater”, the JCL is
created by the screen and can optionally be edited prior to being submitted by the user.
The user has the option of creating their own JCL or using the JCL generated by this utility. In foreground mode, the functions requested are performed interactively and the
results returned to the user. See “CICS Program Inventory Maintenance Screen” on page
This chapter describes the JCL and control statements to use the CICS Program Inventory
Utility (XVTCUTIL).
Job Control Statements
Sample JCL to run the Utility is provided in Xpediter/CICS SMXDSAMP member
JCLCUTIL. This JCL is shown in Figure 13-1 and includes detailed parameter descriptions.
Figure 13-1. Program Inventory Utility JCL (JCLCUTIL)
//* YOUR JOB CARD HERE
.
.
.
.
.
.
//*
//STEP1 EXEC PGM=XVTCUTIL
//STEPLIB DD DISP=SHR,DSN= COMPWARE.cMXDnnn.SMXDOccL
<== CHECK DSN
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//*
//XVTPGINV DD DISP=SHR,DSN=XPEDITER.CICS.PGMINV <== CHECK DSN
//CONTROL DD *
/*
13-2 Xpediter/Code Coverage Mainframe User/Reference Guide
EXEC Statement
The EXEC statement must run PGM=XVTCUTIL. Coding PARM=FULL on your EXEC statement will cause XVTCUTIL to provide messages with more detail. This parameter is optional.
DD Statements
A series of DD statements are used to specify parameters for the execution of Program
Inventory Utility.
SYSPRINT
SYSPRINT represents the report style output from XVTCUTIL. It will contain informational, warning, and error type messages. In some cases, error messages may be written to the JES message log. Both output locations should be checked when determining an error condition.
SYSPRINT will generally be a JES SYSOUT dataset, however, to record SYSPRINT to a permanent dataset, use a 133-byte record length, a fixed or fixed blocked record format, and ANSI carriage control. For example, DCB=(RECFM=FBA,LRECL=133). Dataset blocksize (BLKSIZE) can be set to any desired value.
XVTPGINV
This DD names the primary Program Inventory file, which is the main object of all
Program Inventory Utility commands.
XVTPGCPY
This DD names the target of the COPY command used to copy from one Program
Inventory to another. An example would be:
//XVTPGCPY DD DISP=SHR,DSN=ACME.ALT.PGMINV
Refer to “COPY” on page 13-5 for more details.
XVTPGEXP
This DD names the target of the EXPORT command used to extract program members from a Program Inventory file. An example would be:
//XVTPGEXP DD DISP=SHR,DSN=ACME.EXPORT.PGMINV
See “EXPORT” on page 13-7 for more details. Sample JCL (JCLCDEFE) to define the
export file is supplied in SMXDSAMP.
Program Inventory Utility 13-3
Figure 13-2. JCLCDEFE Sample JCL
//* YOUR JOB CARD HERE
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*
//* CODE COVERAGE INSTALL STEP: JCLCDEFE
//*
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//*
//* JCLCDEFE - IEFBR14 JCL TO ALLOCATE THE XPEDITER/CICS CODE COVERAGE
//* - PROGRAM INVENTORY EXPORT FILE.
//*
//* THE FOLLOWING JCL WILL ALLOCATE AN XPEDITER/CICS CODE COVERAGE
//* PROGRAM INVENTORY EXPORT FILE. SUPPLY THE STEPCAT, VOLSER, UNIT,
//* DSN, AND SPACE PARAMETERS. THIS JCL IS INTENDED AS AN EXAMPLE.
//* PLEASE CONSULT THE INSTALLATION GUIDE BEFORE RUNNING.
//*
//EXPORT EXEC PGM=IEFBR14
//EXPORT DD DSN=XV.PGMINV.EXPORT, <== CHECK DSN
// SPACE=(CYL,(5,5),RLSE), <== CHECK SPACE
// DCB=(RECFM=FB,LRECL=4160,BLKSIZE=24960),
// UNIT=SYSDA, <== CHECK VOLUME
// DISP=(NEW,CATLG)
//
XVTPGIMP
This DD names the source of the IMPORT command used to load program members into a Program Inventory file. An example would be:
//XVTPGIMP DD DISP=SHR,DSN=ACME.EXPORT.PGMINV
See “IMPORT” on page 13-8 for more details.
CCCARDS
Insert this optional DD to name the dataset to be used as output from the GENERATE command. For example:
//CCCARDS DD SYSOUT=*
If this dataset is other than a JES SYSOUT dataset, it must have an 80-byte record length and a fixed or fixed blocked record format. For example, DCB=(RECFM=FB,LRECL=80).
Dataset blocksize (BLKSIZE) can be set to any desired value. Refer to the “GENERATE
Command” on page 13-7 for more details.
CONTROL
This DD contains one or more Code Coverage Program Inventory Utility commands
(control statements). Refer to “Program Inventory Utility Commands” on page 13-4 for
descriptions of the available commands. Each command is honored individually, which means an error in one command will have no direct affect on a subsequent command.
CONTROL will normally be a JES SYSIN dataset, however to use an existing CONTROL dataset, an 80-byte record length and a fixed or fixed blocked record format are required.
For example, DCB=(RECFM=FB,LRECL=80). Dataset blocksize (BLKSIZE) can be set to any desired value.
13-4 Xpediter/Code Coverage Mainframe User/Reference Guide
Program Inventory Utility Commands
The following sections explain the various commands available when running the Code
Coverage Program Inventory Utility. These commands are coded as control statements in the dataset named by the CONTROL DD statement.
CONTROL Statement Parsing
The FORMAT command requires keyword parameters. All other Program Inventory
Utility commands accept positional parameters. All parameters must fit in the first 72 columns of a single 80-byte record. Continuations are not supported.
Keyword parameters are coded keyword=value. The keyword may be a full or abbreviated name.
Positional parameters can include an asterisk (*) wildcard character. This wildcard can be used as a suffix to a value or as the entire value. For example, DFH* would apply to all values which begin with DFH, but * alone would match any value.
The primary positional values are for LMOD, CSECT, and date and time stamp. Some commands may require, or allow for, additional positional parameters. For example, the
COLLECT command allows for a value of ON or OFF as a fourth positional parameter.
FORMAT Command
A Program Inventory dataset must be formatted before it can be used by the CICS component of Xpediter/Code Coverage. Its DCB attributes are RECFM=FBS, and the
LRECL and BLKSIZE must be equal. The BLKSIZE determines the size of a physical record and will default to half-track blocking. The space allocation must allow enough primary and secondary extents to cover the number of blocks to be formatted. The number of blocks to be formatted is specified on a FORMAT command using the keyword parameters described below.
Once you have formatted a Program Inventory, you cannot alter its space allocation
(number of TRKS or CYLS) or DCB attributes (RECFM, LRECL, or BLKSIZE). In order to change DCB attributes, a Program Inventory must be re-allocated and formatted. If an existing Program Inventory is reformatted, the dataset’s secondary allocation can be utilized. Formatting an existing Program Inventory will erase all data in the dataset.
GROUPCNT
The GROUPCNT keyword parameter, abbreviated GC, is used to specify the number of blocks which comprise an extent. For example, if GROUPCNT is 7, then space for each program inventory member will be allocated in increments of 7 blocks. This number must be between 7 and 31 (inclusive). The default is 7.
BLOCKS
The BLOCKS keyword parameter, abbreviated BLK, represents the number of physical records to be formatted. The size of a physical record is specified by the DCB BLKSIZE
Program Inventory Utility 13-5 attribute. Regardless of the JCL SPACE allocation, only this number of BLKSIZE records will be formatted. The default is 3000. When using a half-track blocking factor, this default equates to 1500 tracks or 100 cylinders.
DIRENTS
DIRENTS (abbreviated DENT) specifies the minimum number of directory entries to be allowed. The value specified should be greater than the maximum number of programs to be tested with Xpediter/Code Coverage. The Program Inventory directory is a pre-allocated, contiguous area within the Program Inventory file. This number cannot be changed after the Program Inventory file has been formatted. The default is 1500. Any reasonable value for the number of entries (i.e., a value not exceeding the available blocks) can be specified.
AUTODELETE
AUTODELETE (abbreviated ADEL) optionally specifies that old members may be deleted by the Populate Utility if space is needed to add a new member. If NO is specified for AUTODELETE, the attempt to add the new member will fail. If YES is specified for AUTODELETE, old members will be deleted until sufficient space is available for the new member. All deletes are logged by the Populate Utility. The default is YES.
COLLECT
Use the COLLECT command or the COLLECT control card in the Code Coverage CICS
Populater to set the collection status for your CICS programs.
Before Xpediter/Code Coverage can be used, the COLLECT command — or the COLLECT control card in the Code Coverage Populater — must be used to designate which programs you want Code Coverage to monitor. The COLLECT command sets the collection status for one or more programs to either ON or OFF. When the Code Coverage
CICS Populater adds a program to the Program Inventory, the collection status for that program is initially set to OFF by default.
The COLLECT command can include up to four optional positional parameters.
COPY
lmod
For lmod specify the name of the desired load module or an asterisk (*) wildcard character.
csect
For csect specify the name of the desired CSECT within the specified load module or an asterisk (*) wildcard character.
date/time stamp
Specify the desired compile date/time stamp in the format CCYYMMDDHHMMSS.
ON/OFF
The fourth positional parameter is used to specify collection status. Valid values are
ON and OFF. The default is ON.
The COPY command allows program entries to be copied from one Program Inventory file to another. The source Program Inventory file is named by the XVTPGINV DD
13-6 Xpediter/Code Coverage Mainframe User/Reference Guide statement. The target file for the COPY command is named by the XVTPGCPY DD statement. The COPY command can include up to four optional positional parameters, but must include at least one.
lmod
Specify the name of the desired load module or an asterisk (*) wildcard character. csect
Specify the name of the desired CSECT within the specified load module or an asterisk (*) wildcard character.
date/time stamp
Specify the desired compile date/time stamp in the format CCYYMMDDHHMMSS.
REPLACE
The fourth positional parameter, REPLACE, is used to specify whether an existing duplicate program entry in the target file is to be overwritten. It can be abbreviated
REP. The default is to not overwrite an existing duplicate program entry.
Note: The EXPORT and IMPORT commands can be used to copy program members between Program Inventory files on systems that do not share DASD. The
EXPORT command is used to create a sequential dataset that is transmitted to the target system. The IMPORT command is then be used to load the selected members from the transmitted sequential dataset into the target system’s
Program Inventory file.
DELETE Command
The DELETE command allows program entries to be removed from the Program
Inventory file. The DELETE command can include up to three optional positional parameters, but must include at least one.
lmod
Specify the name of the desired load module or an asterisk (*) wildcard character.
csect
Specify the name of the desired CSECT within the specified load module or an asterisk (*) wildcard character.
date/time stamp
Specify the desired compile date/time stamp in the format CCYYMMDDHHMMSS.
Program Inventory Utility 13-7
DIR Command
The DIR command builds a report of each program entry within a Program Inventory file and writes it to the specified SYSPRINT location. The DIR command can include up to three optional positional parameters.
lmod
Specify the name of the desired load module or an asterisk (*) wildcard character.
csect
Specify the name of the desired CSECT within the specified load module or an asterisk (*) wildcard character.
date/time stamp
Specify the desired compile date/time stamp in the format CCYYMMDDHHMMSS.
GENERATE Command
The GENERATE command writes a series of COLLECT control statements to the dataset named by the optional CCCARDS DD statement. The CCCARDS dataset may be used as input to subsequent executions of the Program Inventory Utility by specifying it in the
CONTROL DD statement. The COLLECT control statements output by the GENERATE command have no wildcards values and their collection status is ON. The GENERATE command can include up to three optional positional parameters.
lmod
Specify the name of the desired load module or an asterisk (*) wildcard character.
csect
Specify the name of the desired CSECT within the specified load module or an asterisk (*) wildcard character.
date/time stamp
Specify the desired compile date/time stamp in the format CCYYMMDDHHMMSS.
EXPORT
The EXPORT command allows program entries to be extracted from a Program Inventory file into a sequential dataset. The source Program Inventory file is named by the
XVTPGINV DD statement. The XVTPGEXP DD statement names the target file for the
EXPORT command. The EXPORT command can include up to three optional positional parameters, but must include at least one.
lmod
Specify the name of the desired load module or an asterisk (*) wildcard character.
13-8 Xpediter/Code Coverage Mainframe User/Reference Guide csect
Specify the name of the desired CSECT within the specified load module or an asterisk (*) wildcard character.
date/time stamp
Specify the desired compile date/time stamp in the format CCYYMMDDHHMMSS or an asterisk (*) wildcard character.
Note: The EXPORT and IMPORT commands can be used to copy program members between Program Inventory files on systems that do not share DASD. The
EXPORT command is used to create a sequential dataset that is transmitted to the target system. The IMPORT command is then be used to load the selected members from the transmitted sequential dataset into the target system’s
Program Inventory file.
IMPORT
The IMPORT command allows program entries to be loaded into a Program Inventory file from an EXPORT sequential dataset. The XVTPGIMP DD statement names the source file for the IMPORT command. The XVTPGINV DD statement names the destination Program
Inventory file. The IMPORT command can include up to four optional positional parameters, but must include at least one.
lmod
Specify the name of the desired load module or an asterisk (*) wildcard character.
csect
Specify the name of the desired CSECT within the specified load module or an asterisk (*) wildcard character.
date/time stamp
Specify the desired compile date/time stamp in the format CCYYMMDDHHMMSS or an asterisk (*) wildcard character.
REPLACE
Specify whether an existing duplicate program entry in the target file is to be overwritten. The default is to not overwrite an existing duplicate program entry.
Note: The EXPORT and IMPORT commands can be used to copy program members between Program Inventory files on systems that do not share DASD. The
EXPORT command is used to create a sequential dataset that is transmitted to the target system. The IMPORT command is then be used to load the selected members from the transmitted sequential dataset into the target system’s
Program Inventory file.
Download
Advertisement
Key features
Code coverage analysis
Report generation
Mainframe platform support
Multiple programming language support
Frequently asked questions
Xpediter Code Coverage is a software tool that helps you to test and analyze the code coverage of your mainframe applications.
It collects data about the code coverage of your programs and generates reports that show you which parts of your code have been executed and which parts have not been executed.
It supports a variety of mainframe platforms, including z/OS, z/VM, and z/VSE.
It supports a variety of programming languages, including COBOL, PL/I, and Assembler.