Enterprise COBOL AZUTC004 sample test case (for AZUTSTRN runner)

The ZUnit Enterprise COBOL AZUTC004 sample is a COBOL source file for generating and running a test case with test data. This sample file demonstrates how to test a COBOL program with file I/O calls by generating stub programs that simulate the file I/O operations on the test runner (AZUTSTRN).

Before using this sample file:
  1. Verify that you have access to the following resources:
    • A z/OS® system with the XML Toolkit for z/OS installed.
    • The Rational Developer for System z client version 9.1.1 or later.
    • The Rational Developer for System z version 9.1.1 or later data sets FEL.SFELSAMP and FEL.SFELLOAD installed on z/OS.
    • A connection to a z/OS system that is defined in the Remote Systems view.
  2. Verify that procedure FEL.SFELSAMP(AZUZUNIT) was customized according to the instructions in xUnit support for Enterprise COBOL and PL/I.
  3. Verify that the z/OS Automated Unit Testing Framework (ZUnit) component of Developer for z/OS is installed on the client.
    To verify that the ZUnit component is installed:
    1. Click Help > About IBM® Developer for z/OS.
    2. On the About IBM Developer for z/OS window, click Installation Details.
    3. On the IBM Developer for z/OS Installation Details window, click the Installed Software tab.
    4. Scroll through the list of installed features to find ZUnit feature. If this feature is installed, you can use the sample files. If the ZUnit feature is not installed, Update your installation of the client to include the ZUnit feature.
  4. Verify file mappings for the test data generation, configuration, and results files, and the test data schema XSD files.
    Open the z/OS File System Mapping view and look for the following entries:
    Mapping Criterion Workstation File Extension Transfer Mode Host Code Page Local Code Page
    **AZUCFG azucfg binary UTF-8 UTF-8
    **AZUGEN xml binary UTF-8 UTF-8
    **AZURES azures binary UTF-8 UTF-8
    **AZUSCH xsd binary UTF-8 UTF-8
    **AZUTDT xml binary UTF-8 UTF-8
    If these entries do not exist, do one of these steps:
    • Create a workspace. Workspaces created by version 9.1.1 or later include these mappings.
    • Add mappings with these characteristics to your current workspace. For instructions for creating file mappings, see Mapping data sets and partitioned data set members.
    • If push-to-client support is enabled on the remote system, you can add these mappings to the z/OS file system mapping configuration files so that they are downloaded to each client when it connects to the remote system. For more information about push-to-client, see Distribution of updates by using push-to-client.
By using these sample files, you can accomplish these tasks:
  1. Create a test case from the TOURFILE.cbl sample COBOL program.
  2. Add test data to the test case.
  3. Import test data into the test entries.
  4. Build and run the test case.
  5. Use test case results to correct an error in the sample COBOL program.