Setting File I/O options for a test case

Use the ZUnit category in the property group editor to set File I/O options for a COBOL or PL/I program.

About this task

You can use external files to provide input and expected output for a test case. You can use file I/O for a test case in the following ways:
  • Specify an existing file as the input file and as the expected output file for each test entry.
  • Specify an existing file as the input file or specify test data in the Test Case Editor to generate an input working file.
  • Specify an existing file as the expected output file. After executing the test case, ZUnit uses the SuperC Compare Utility to compare a generated output working file with the specified file and then shows the result.
  • Specify test data as expected output values in the Test Case Editor to validate the generated output file.
The input file that is generated by ZUnit, the output file, and the SuperC Compare Utility result file are called the working file.

Procedure

  1. In the property group editor, select the Category tab and click z/OS Automated Unit Testing Framework (ZUnit).
    A ZUnit tab is added to the property group editor.
  2. Select the ZUnit tab.
  3. Select File I/O.
    The File I/O page opens.
  4. You can set these options for File I/O:
    High-level qualifier: The high-level qualifier for the VSAM or QSAM data files for file I/O simulation. These files are allocated for file I/O simulation when running a ZUnit test case. Use the remaining fields on this page to specify data set allocation parameters:
    • Space units: Defines the unit of primary and secondary space to be allocated. The default value is TRACKS. Select one of these values:
      • TRACKS: A track of a direct access storage device (DASD).
      • BLOCKS: A block of a DASD.
      • CYLINDERS: A cylinder of a DASD.
    • Primary quantity: The amount of DASD space to be used for primary space allocation (PRIMARY). The range depends on the space unit specified and the type of DASD. The default value is 100.
    • Secondary quantity: The amount of DASD space to be used for secondary space allocation (SECONDARY). The range depends on the space unit that is specified and the type of DASD. The default value is 100.

    Allocate data set for working file automatically: If this option is selected, the data set for the working file is allocated automatically with the allocation options specified on this page. If this option is not selected, then you must manually allocate the data set for the working file before you run the ZUnit test case.

    The SuperC Compare Utility compares the output file and the specified existing file while running a ZUnit test case.
    • Process options: Specify SuperC process options. Separate multiple options with a comma ( , ) or space ( ).
    • Process statements: Specify SuperC process statements.
    For information about the SuperC Compare Utility, see SuperC reference in the related links.
  5. Close the property group editor and save the property group.