Setup instructions

Before you use the Enterprise COBOL AZUTC007 (CALL02) sample, allocate data sets for the source file and generated files, copy the sample file into a partitioned data set, create a property group that specifies compiler and link options for the data sets, and create a z/OS® project for the sample.

Before you begin

Connect to the remote system and allocate data sets for the sample by using the instructions in Sample JCL to allocate ZUnit data sets.

About this task

The Enterprise COBOL AZUTC007 sample is in the rdz\\AZUTC007\src folder of the installation path, for example, C:\Program Files\IBM\SDP\rdz\\AZUTC007\src. The sample includes the following files:
File name Description
CALL02.cbl A sample COBOL program that calls sub program SUB02A and SUB02B.
SUB02A.cbl A sub program invoked by the dynamic call from CALL02.cbl.
SUB02B.cbl A sub program invoked by the static call from CALL02.cbl.
When you work through the sample scenario, you generate additional files that are used to demonstrate ZUnit functions.

Procedure

To set up the sample:

  1. Copy the CALL02.cbl, the SUB02A.cbl, and the SUB02B.cbl sample files into the <HLQ>.ZUNIT.SOURCE.COBOL data set.
  2. In the Property Group Manager, select the remote system that contains the ZUnit data sets and create a property group that specifies the following categories and properties.
    Category > Page Property Value
    Info Name AZUDRCOB
      Description Property group for the ZUnit COBOL samples running on Dynamic Test Runner
    JCL JCL job card Specify any JCL statements required for the z/OS system. You might need to add a JCLLIB statement to call ELAXF* remote build procedures. For more information, see ELAXF* remote build procedures.
    Link > Procedures and Steps
    ELAXFLNK-LINK
    Link options
    REUS
     
    ELAXFLNK-LINK
    Load module location
    <HLQ>.ZUNIT.COBOL.LOAD
    Link > JCL substitution User variables: Variable name FELPRFX
      User variables: Variable value: Specify the data set prefix for the *.*.SFELSAMP partitioned data set. Contact your systems administrator for the data set name.
    COBOL > Procedures and Steps
    ELAXFCOC-COBOL
    Compiler options
    SOURCE LIB
     
    ELAXFCOC-COBOL
    Debug data set
    <HLQ>.ZUNIT.COBOL.SYSDEBUG
     
    FELAXFOC-COBOL
    Object deck data set
    <HLQ>.ZUNIT.COBOL.OBJECT
     
    ELAXFCOC-COBOL
    SYSLIB
    Specify the data set prefix for the *.*.SBZUSAMP partitioned data set. Contact your system administrator for the data set name.
     
    ELAXFCOC-COBOL
    Support Error Feedback
    Select this check box and specify this data set qualifier for compiler errors: <HLQ>.ERRCOB
    ZUnit > Procedures and Steps
    BZUPLAY-REPLAY
    Additional JCL
    //STEPLIB  DD
    //         DD
    //         DD
    //         DD
    //         DD
    //         DD
    //         DD
    //         DD
    //         DD
    //         DD
    //         DD  DISP=SHR,DSN=<HLQ>.ZUNIT.COBOL.LOAD
    Note: The number of empty lines depends on your STEPLIB definition in BZUPPLAY PROCLIB.
  3. In the z/OS Projects view, create a z/OS project named ZUnit Enterprise COBOL samples and an MVS™ subproject named sample7, associate the AZUDRCOB property group with the subproject, and add the <HLQ>.ZUNIT.SOURCE.COBOL(CALL02), <HLQ>.ZUNIT.SOURCE.COBOL(SUB02A), and <HLQ>.ZUNIT.SOURCE.COBOL(SUB02B) data sets to the subproject.
    Tip: By using the New z/OS Project wizard, you can complete all of these actions at the same time. The wizard guides you through the process of creating the project, creating the subproject, associating the property group with the subproject, and adding remote resources to the subproject. To start the wizard, select New > z/OS Project from the pop-up menu of the z/OS Projects view.
  4. Compile and link-edit <HLQ>.ZUNIT.SOURCE.COBOL(SUB02A) as the load module <HLQ>.ZUNIT.SOURCE.COBOL.LOAD(SUB02A). Associate the AZUDRCOB property group.
  5. Compile and link <HLQ>.ZUNIT.SOURCE.COBOL(CALL02) and <HLQ>.ZUNIT.SOURCE.COBOL(SUB02B) as the load module <HLQ>.ZUNIT.SOURCE.COBOL.LOAD(CALL02). Associate the AZUDRCOB property group.
  6. Create the JCL to invoke the CALL02 application as <HLQ>.ZUNIT.JCL(CALL02). Add PARM=('ABCDEF') to the execution procedure.
  7. Click Preferences > z/OS Automated Unit Testing Framework (ZUnit) > Batch Recording Service. Click z/OS Automated Unit Testing Framework (ZUnit) or expand the preferences to open additional ZUnit preference pages.
    Item Value
    Dynamic Runtime Library Specify the data set for the *.*.SBZULOAD partitioned data set. Contact your system administrator for the data set name.
  8. In Preferences > z/OS Automated Unit Testing Framework (ZUnit), select Dynamic test runner (BZUPLAY). Click Apply and then close the setting.

Results

The following resources are added to your workspace:
Figure 1. Property group. Property group editor with a property group created for the Enterprise COBOL test data samples on Dynamic Test Runner.
Property group editor with a property group created for the Enterprise COBOL test data samples on Dynamic Test Runner.

What to do next

Create/modify a test case from CALL02.cbl