Verifying the Code Coverage Installation. Compuware Mainframe
Tangazo
Tangazo
4-1
Chapter 4.
Verifying the Code Coverage Installation
This chapter provides step-by-step instructions for the verification of the Code Coverage installation.
Verifying the Installation of Xpediter/Code Coverage
The following procedures are designed to verify successful installation of the
Xpediter/Code Coverage for the environments where Code Coverage will be used.
Compuware strongly recommends that, in addition to these procedures, you test your own application with Code Coverage before considering the installation complete.
Step 1. Establish Batch COBOL Support (Optional)
If your site will not be using Xpediter/Code Coverage for batch applications, this step may be skipped.
Test Preparation
Table 4-1 lists the sample programs used for verification of Xpediter/Code Coverage.
Check the list for the programs you must compile for your environment. The programs are contained in the Xpediter/TSO samples dataset, SLXTSAMP. Use the COBOL Language
Processor (LP) to compile the sample programs in the listed order. Some main routines statically link to subroutines higher in the list. Refer to the Compuware Shared Services
User/Reference Guide for information on using the COBOL Language Processor. Optionally, you can use the online Compile Facility provided by Xpediter/TSO by selecting option 1
(PREPARE) from the Xpediter/TSO Primary Menu.
Table 4-1.
Xpediter/TSO COBOL Installation Verification Programs
Program Name Required to Verify Support for:
TRITST
TRIRPT
TRIMAIN calls TRITST and TRIRPT
COBOL
COBOL
COBOL
TRITST2
TRIRPT2
TRIMAIN2 calls TRITST2 and TRIRPT2
COBOL
COBOL
COBOL
Note the following:
• Code Coverage requires specific compile options which may vary depending on the language type and actual version being used. Always refer to the appropriate CSS
User/Reference Guide for information related to any required compiler options. An example follows: (1) Options NOTEST and NONUMBER are required for COBOL.
4-2
Xpediter/Code Coverage Installation and Configuration Guide
The CSS User/Reference Guide is required to assist users in manually converting Compile and Link JCL to execute the CSS Language Processor. The Guide also gives users information on how to set up the Language Processor parameters to write a matching source listing to a DDIO file.
• Most of the sample programs are coded to require APOST and LANGLVL(2), although Xpediter/TSO fully supports both the QUOTE and the LANGLVL(1) compiler options for your programs.
• The SYSLMOD output from these compiles should not be directed to the
Xpediter/TSO LOADLIB library, but to a dataset available to your application programmers for training sessions. For example, you could create a dataset named
CPWR.XT.TRAINLIB.
• Make sure you exercise each of your modified PROCs at least once, even if this means compiling some of the sample programs more than once.
To verify that the compile was successful and that a source listing member was created, check the listing under the ddname CWPERRM for a message similar to the following:
LISTING PGMNAME DATED nn/nn/nn AT nn.nn.nn SUCCESSFULLY WRITTEN TO CWPDDIO
Test Initiation and Execution
1. Select 2 (TSO) from the Xpediter/TSO Primary Menu.
2. Select 1 (STANDARD) from the Environments Menu.
Note: The Environments Menu is automatically displayed if this is your first time to
invoke a test session. Otherwise, you can access the Environments Menu by entering SETUP from the command line of the displayed test screen and selecting option 0 from the Test Setup Menu.
3. Enter SETUP from the Standard test screen.
4. Select 1 (LOADLIBS) from the Setup Menu.
5. On the Load Module Libraries screen, specify the application load library that contains the TRIMAIN or TRIMAIN2 load module.
6. Press Enter.
7. Select 2 (DDIO) from the Setup Menu.
8. On the DDIO Files screen, specify the DDIO dataset name that contains the source listing member of TRIMAIN or TRIMAIN2.
9. Press Enter.
10. Select C (Code Coverage) from the Setup Menu.
11. On the Code Coverage setup screen, specify a user-defined System ID and Test ID (for the purpose of the IVP specify SYSTEM1 and TEST1 respectively).
12. Also enter the name of the Code Coverage repository created in “Step 3. Create a
Results Repository Dataset” on page 2-4. Refer to Figure 4-1.
Verifying the Code Coverage Installation
4-3
Figure 4-1. Entering Code Coverage Information
--------------------- XPEDITER/TSO - CODE COVERAGE --------------------------
COMMAND ===>
Repository DSNAME ===> 'COMPWARE.CC.REPOSIT'
System Name ===> SYSTEM1 Test ID ===> TEST1
Test Data Optimization Dataset: (DSNAME will be generated if blank)
DSNAME ===>
Data Class ===>
Space Units ===> TRK
Primary ===> 2 Disposition Options:
Secondary ===> 2 A (Append)
Storage Class ===> D (Delete)
Unit ===> K (Keep)
Volume ===> ? (Prompt)
Disposition After the Test ===> K (K or ?)
Disposition Before the Test ===> A (A, D, or ? Only if DSN specified)
Press ENTER to Process or Enter END Command to Terminate
13. Press Enter.
14. Enter END or press PF3 to return to the Standard screen.
15. Specify only the field values listed on the sample Standard Test screen illustrated in
Figure 4-2. Leave all other fields blank. Be sure to populate the Code Coverage Test?
field with YES.
Note: If the IVP program you are using is TRIMAIN2, use JCL member TRIJCL2 in
the SLXTSAMP library.
Figure 4-2. Standard Test Screen
Profile: XXX ---------- XPEDITER/TSO - STANDARD (2.1) -----------------------
COMMAND ===>
COMMANDS: SEtup (Display Setup Menu)
PROFile (Display Profile Selection)
TEST SELECTION CRITERIA:
Program ===> TRIMAIN
Entry Point ===>
Load Module ===>
Initial Script ===>
Post Script ===>
PARM ( Caps = YES ) ===>
File List/JCL Member ===> ’COMPWARE.XT.SLXTSAMP(TRIJCL)’
Preview Files? ===> NO
Code Coverage Test? ===> YES (YES, NO, TDO) SYSTEM FLOW? ===> NO
Is This a DB2 Test? ===> NO Plan ===> System ===>
Press ENTER to process or enter END command to terminate
16. Press Enter to begin the Xpediter/TSO debugging session.
The message area contains information on the files being allocated. On a cleared screen, a message indicating a test session is being entered appears.
4-4
Xpediter/Code Coverage Installation and Configuration Guide
17. Type GO on the command line and press Enter.
The execution pauses at the GOBACK statement. A message is reported in the area below the command line stating TEST COMPLETED.
18. Type GO and press Enter to return to the Standard screen.
19. Type LOG on the command line to enter the test log.
20. Type M and press PF8 to page to the bottom of the log.
A message will indicate that the Code Coverage statistics were successfully written to the repository.
21. Type END or press PF3 to exit the log.
22. Type D in the Process Option field to delete the log.
Step 2. Establish Online IMS Support (Optional)
If your site will not be using Xpediter/Code Coverage for online IMS applications, this step may be skipped.
Test Initiation and Execution
1. Before verifying Xpediter/IMS, make sure you have included the following information in your IMS control blocks gen.
– XPIMSDBT database
– A message processing program PSB named TRIMPP
– Transaction TRIMPP is associated with the above application
– The message format control blocks
2. Compile sample program TRIMPP as part of your system verification, using the appropriate options.
The Xpediter/IMS sample program TRIMPP is shipped in source form with the product. This sample program must be compiled as a part of your system verification procedure.
Verify your Xpediter/IMS compile PROCs. If your site supports multiple types of compile PROCs, you must verify all of them using the sample programs.
Note: Module TRIMPP must be link-edited with entry point DLITCBL.
Xpediter requires specific compile options which may vary depending on the language type and actual version being used. A user should always refer to the appropriate CSS User/Reference Guide for information related to any required compiler options. For example: (1) Options NOTEST and NONUMBER are required for COBOL.
The guide is required to assist users in manually converting Compile and Link JCL to execute the CSS Language Processor. The guide also gives users information on how to set up the Language Processor parameters to write a matching source listing to a source listing file.
Compile the sample programs with COBOL. To verify that the compile was successful and that a source listing was created, check the listing under the ddname CWPERRM for a message similar to the following:
LISTING PGMNAME DATED nn/nn/nn AT nn.nn.nn SUCCESSFULLY WRITTEN TO CWPDDIO
3. Once you have a valid load module and source listing dataset, log on to TSO and invoke the Primary Menu. Use whatever procedures you selected while installing this
Primary Menu.
– Select 2 (TSO) to display the Environments Menu.
Verifying the Code Coverage Installation
4-5
Note: The Environments Menu is automatically displayed if this is your first
time to invoke a test session. Otherwise, you can access the
Environments Menu by entering SETUP from the command line of the displayed test screen and selecting option 0 from the Test Setup Menu.
– Select either 8 (MPP) or 9 (BMP/IFP) from the Environments Menu.
– From the test screen, enter the command SETUP to display the Setup Menu.
– Select A (All) to review all your setup selections.
• Load libraries—the user program libraries allocated as STEPLIB. Verify that the order of concatenation is correct.
• DDIO dataset—the library name should be the dataset name of the DD
CWPDDIO in your Xpediter compile step.
• Test script libraries.
• Test session log dataset.
• Test session script dataset.
• DB2 system names and DSNLOAD datasets.
• PANEXEC defaults (if installed).
• PSB and DBD libraries (GSAM only).
• IMS preload list.
• IMS authorized load libraries.
• IMS region ID and PARM strings—PARM fields set up at install time can be changed.
– Press PF3 from the Setup Menu to return to the test screen.
– Select C (Code Coverage) from the Setup Menu
The Xpediter/IMS sample source program TRIMPP is found in the SLXTSAMP dataset.
TRIMPP is the driver module. The program issues a GU call to the message queue and reads in the three sides of a triangle that were entered from the IMS terminal through the format TRIMPP. The program then issues a GU call to the database to check whether this particular configuration of values has been entered before. If a matching record is found, the program retrieves the type of triangle data and sends the response back to the IMS terminal. If not, the program calls the subprogram TRITST to determine the type of triangle, stores the information in the database for future reference, and sends the response back to the IMS terminal.
4. On the Code Coverage setup screen, specify a user-defined System ID and Test ID (for the purpose of the IVP specify SYSTEM1 and TEST1 respectively).
5. Also enter the name of the Code Coverage repository created in “Step 3. Create a
Results Repository Dataset” on page 2-4. Refer to Figure 4-3.
4-6
Xpediter/Code Coverage Installation and Configuration Guide
Figure 4-3. Entering Code Coverage Information
--------------------- XPEDITER/TSO - CODE COVERAGE --------------------------
COMMAND ===>
Repository DSNAME ===> 'COMPWARE.CC.REPOSIT'
System Name ===> SYSTEM1 Test ID ===> TEST1
Test Data Optimization Dataset: (DSNAME will be generated if blank)
DSNAME ===>
Data Class ===>
Space Units ===> TRK
Primary ===> 2 Disposition Options:
Secondary ===> 2 A (Append)
Storage Class ===> D (Delete)
Unit ===> K (Keep)
Volume ===> ? (Prompt)
Disposition After the Test ===> K (K or ?)
Disposition Before the Test ===> A (A, D, or ? Only if DSN specified)
Press ENTER to Process or Enter END Command to Terminate
6. Press Enter.
7. Type END or press PF3 from the Setup Menu to return to the test screen.
8. Select 2 (TSO) from the Xpediter/TSO Primary Menu. This invokes the Environments
Menu from which you select 8 (MPP).
Note: The Environments Menu is automatically displayed if this is your first time to
invoke a test session. Otherwise, you can access the Environments Menu by entering SETUP from the command line of the displayed test screen and selecting option 0 from the Test Setup Menu.
9. On the MPP Test screen illustrated in Figure 4-4, type TRIMPP as the PROGRAM to be
verified, or TRIMPP as the TRANCODE, or both and press Enter. Be sure to populate the Code Coverage Test? field with YES.
Figure 4-4. MPP Test Screen
Profile: XXX ------------ XPEDITER/TSO - MPP (2.8) -------------------------
COMMAND ===>
COMMANDS: SEtup (Display Setup Menu)
INter (Display Intercepts)
PROFile (Display Profile List) DOwn (Scroll Down)
INTERCEPTS Row 1 of 3
PROGRAM TRANCODE INITSCR POSTSCR START MAX ------------ DATA ------------
> TRIMPP
>
>
IMS USERID ===> PFHABC0 Retain Breakpoints? ===> NO
NBA ===> 2 (Normal Buffer Allocation)
OBA ===> 3 (Overflow Buffer Allocation)
File List/JCL Member ===>
Unattended ===> NO
Code Coverage Test? ===> YES (YES, NO, TDO) System Flow? ===> NO
Is This a DB2 Test? ===> NO System ===>
Press ENTER to process or enter END command to terminate
Verifying the Code Coverage Installation
4-7
10. If the intercepts are set, the following messages appear on the screen:
*** THE IMS INTERCEPTS ARE BEING SET ***
*** INTERCEPTS SET - STARTING THE IMS REGION ***
*** THE TEST TRANSACTION CAN BE ENTERED ***
The terminal is then locked. If an error is encountered, however, the intercept is not set and an appropriate error message appears on the message line or in the log.
Note: Xpediter automatically starts the message region. You do not have to submit
any MSG region JCL for testing under Xpediter.
11. Go to an IMS terminal connected to an associated IMS/DC control region and type
/FOR TRIMPP. Press Enter.
12. On the formatted data entry screen, type the values 9 8 7 for the three sides of a triangle and press Enter.
13. Go to the TSO terminal and wait for the source display of program TRIMPP.
The symbolic representation of the source code is displayed, beginning with the
Procedure Division. The third header line contains the program name of the module you are currently in; i.e., PROGRAM: TRIMPP. The arrow pointing to the ENTRY
’DLITCBL’ USING IOPCB, DBPCB statement indicates that execution starts at this entry point. The execution arrow also corresponds to what is in the execution status message area; i.e., Before TRIMPP. The Keep window automatically displays the value of the data items on the current line.
14. The B in column 9 of the ENTRY ’DLITCBL’ line is set automatically by Xpediter/IMS.
Press PF8 to scroll down. The A in column 9 of statement number 149 (GOBACK) is also set by Xpediter/IMS. Press PF6 or enter LOCATE * to return to the execution arrow.
15. Type GO on the command line and press Enter. The execution pauses at the GOBACK statement. A message is reported in the area below the command line stating TEST
COMPLETED.
16. Type EXIT or press PF4 to return to the Standard screen.
17. Type LOG on the command line to enter the test log.
18. Type M and press PF8 to page to the bottom of the log. At this point, there will be message indicating the Code Coverage statistics were successfully written to the repository.
19. Type END or press PF3 to exit the log.
20. Type D in the Process Option field to delete the log.
Step 3. Establish CICS Support (Optional)
If your site will not be using Xpediter/Code Coverage for CICS applications, this section may be skipped.
Test Preparation
The test programs are used to verify proper installation and to demonstrate the product.
Table 4-2 shows the program name for each test program and the language that it is used
for. The table also includes the name of the Assembler subroutine that is called by this program.
4-8
Xpediter/Code Coverage Installation and Configuration Guide
For specific information on compiling your programs using the Compuware language processor, refer to the Enterprise Common Components Installation and Customization Guide.
Table 4-2.
Test Programs
Program Name Language
CWDEMCB2 COBOL
CWCDSUBA Assembler Subroutine
Note: If you have previously compiled the test programs as part of the Xpediter/CICS
installation, you do not need to recompile them.
Complete the following steps to ensure that the test programs function properly:
1. Assemble program CWCDSUBA. If you have the Assembler option, process it using the Compuware Assembler language processor. The CWCDSUBA routine does not contain any CICS commands and, therefore, does not need to be translated.
CWCDSUBA must be included when CWDEMCB2 is link-edited.
2. Compile the CWDEMCB2 program with the modified compile/link-edit JCL that includes the Compuware COBOL language processor. Use the NODYNAM parameter in the COBOL compile step and make sure that the library for CWCDSUBA is in the
SYSLIB dataset.
Populate Program Inventory
1. Edit the member JCLCPOP in the Xpediter/CICS SMXDSAMP dataset.
2. Add a valid jobcard.
3. Modify the steplib to contain the Xpediter/CICS and Compuware Shared Services libraries.
4. Modify the DFHRPL DD to contain the load library that contains CWDEMCB2.
5. Modify the SLSF001 DD to contain the Source Listing Library that contains the source listing for CWDEMCB2.
6. Modify the XVTPGINV DD to contain the program inventory defined to the CICS region.
7. Modify the EXCLUDES DD to point to the excludes member (POPEXCL) in the
Xpediter/CICS SMXDSAMP dataset.
8. Add the following statements to the CONTROL DD to populate the program inventory file with the new copy of the program, delete all old copies of the program, and set the program for collection by Xpediter/Code Coverage:
REPLACE ALL
COLLECT ON
DEFINE CWDEMCB2 *
9. Submit the JCL.
Test Definition and Execution
1. On a blank CICS screen type XPED and press Enter. This activates Xpediter/CICS and presents the Xpediter/CICS Primary Menu.
2. Type C (Code Coverage) on the command line.
3. Press Enter
4. Type 1 to select the Test Definition screen.
5. Press Enter.
Verifying the Code Coverage Installation
4-9
6. Specify a user-defined System Name and Test Identifier (for the purpose of the IVP
specify SYSTEM1 and TEST1 respectively). Refer to Figure 4-5.
Figure 4-5. Entering Code Coverage Information
--------------- XPEDITER/CODE COVERAGE - Test Definition (1) --------------C123
COMMAND ===> SCROLL ===> CSR
Userid: ACMJET0
Entry 1 of 1
Available Commands are highlighted:
(S) Specify Collection (H) Halt Collection (V) View Collection Activity
(SC) Start Code Coverage (SF) Start System Flow (SB) Start Both
(E) Extract Entry (ES) Extract System Next Full Extract: 08:42:36
(D) Delete Entry (DS) Delete System Current Time: 08:27:31
(B) Browse (A) Archive
Code System
CMD System Name Test Identifier Owner Status Coverage Flow
-------------------------------------------------------------------------------
__ SYSTEM1 TEST1 ACMJET0 Incomplete
__ _______________ _______________
__ _______________ _______________
__ _______________ _______________
__ _______________ _______________
__ _______________ _______________
__ _______________ _______________
__ _______________ _______________
__ _______________ _______________
__ _______________ _______________
PF1 Help PF3 End Extract All (Y/N): N
7. Press Enter.
8. Type S in the line command field next to your newly created system.
9. Press Enter.
10. On the Collection Specification screen: a. Type your userID in the first User column.
b. Type XCB2 in the Tran field.
c. Type CWDEMCB2 in the program field.
d. Type an asterisk (*) in the CSECT field.
11. Press Enter.
12. Press PF4 to validate the wildcarded collection specification.
13. Verify the collection specifications. The Collection Validation screen identifies the
two entries shown in Figure 4-6. The Load Library (Lib), Program Inventory (INV)
and Member Listing indicators should be set to 'Y', and the Collection Status set to
ON.
4-10
Xpediter/Code Coverage Installation and Configuration Guide
Figure 4-6. Using the Collection Validation Screen to Validate Specifications
------------ XPEDITER/CODE COVERAGE - Collection Validation (1) -----------C123
COMMAND ===> SCROLL ===> CSR
Userid: ACME123 ******** XVTC0136I Bottom of data reached *********
System Name: SYSTEM1 TestID: TEST1 Owner: ACME123
Program/CSECT: CWDEMCB2/********
Collection Matches: 00002 of 00002 Validating 01 of 01 masks
-------- Program ------- ------ Compile ------ --- Source ---- Coll
Module Lib Csect Inv Date Time Member Listing Status
------------------------ --------------------- --------------- ------------
CWDEMCB2 Y CWCDSUBA Y 2003/07/17 16:24:00 CWCDSUBA Y ON <----
CWDEMCB2 Y CWDEMCB2 Y 2003/07/17 15:52:15 CWDEMCB2 Y ON <----
**END**
PF1 Help PF3 End
14. Type END or press PF3 to return to the Test Definition/Collection Specification screen.
15. Type END or press PF3 to return to the Test Definition Update screen.
16. Type SC in the line command field next to your newly created system to start Code
Coverage collection.
17. Press Clear to return to CICS so that you can begin you test.
18. On a blank CICS screen, type XCB2 and press Enter. The XCB2 Demonstration
Transaction screen is displayed.
19. To allow the transaction to end normally, type 00999 and press Enter.
20. Press Clear to return to CICS.
21. Type XPED and press Enter.
22. Type C (Code Coverage) on the command line and press Enter.
23. Type 1 to return to the Test Definition screen.
24. Type H in the line command field next to your newly created system to write the
Code Coverage statistics to the repository.
Step 4. Set Up Code Coverage Reporting
1. From the Code Coverage Primary Menu, type 0 to enter the Code Coverage Defaults
Menu.
2. Type 2 (Repository) and press Enter.
3. Enter the name of the repository that is defined in the CICS extraction JCL.
4. Press Enter.
5. Type END or press PF3 to return to the Defaults Menu.
6. Type 3 (Source Listing File) and press Enter.
7. Enter the name of the Source Listing File that contains the listing of CWDEMCB2.
8. Press Enter.
9. Type END;END or press PF3 twice to return to the Code Coverage Primary Menu.
Verifying the Code Coverage Installation
4-11
10. Type 1 to enter the Reports screen.
11. Enter the name of your system under the System Name column and your test id under the Test ID column (for the purpose of the IVP it should be SYSTEM1 and
TEST1.
12. Type S on the line command field next to your system name to execute the JCL that creates the Code Coverage reports.
13. Review the reports in the output of the job on the held cue. There should be execution statistics for each program that was executed with Code Coverage.
4-12
Xpediter/Code Coverage Installation and Configuration Guide
Pakua
Tangazo