Default language.

Verifying z/OS Datasets


You have two ways to verify data sets on the mainframe in a test scenario. You can use the Verify Dataset element that is built into Non-virtualized test, or, if you have File-AID Compare installed at your LPAR, you can use the File-AID Compare element to utilize the more advanced functionality from File-AID.

Using Verify Dataset

When testing z/OS programs it is possible to verify if output data sets/files written by a program contain expected information after a component has been executed. Three options are available:

  1. Use a Read Dataset element to retrieve the data set as characters into the test scenario and use a Verify element to analyze the data with an expression. For example, extract a data  set and ensure that it does not contain the word audi:
    image2022-11-8_12-32-2.png
    image2022-11-8_12-32-39.png
  2. Use a Verify Dataset element. This will compare an expected and an actual data set at z/OS. The comparison will be made by a Non-virtualized Test module that will report a Validation error if the two data sets are not exactly equal. It is also possible to write a custom compare module that will do the comparison. Read more about this in another chapter. This could look like:
    image2022-11-8_12-33-31.png
  3. Use Verify Dataset as part of the Component element in the test scenario to setup expected and actual data set. This is basically the same as having one Component element and one Verify Dataset element, but it will be executed in one job at z/OS instead of two jobs. Using this could look like:
    image2022-11-8_12-33-54.png

Using File-AID Compare

When testing z/OS programs it is possible to verify if output data sets/files written by a program contain expected information after a component has been executed utilizing the advanced functionality from File-AID.

  1. Follow the instructions under File-AID-Compare element to add this to your Test Scenario.
    To capture the JCL needed for this element, do the following:
  2. Use the File-AID product to perform a compare on the data sets you need to compare.

a. Select Batch mode.

b. When you have the option to "use JCL command to edit generated JCL", type JCL to get the JCL.

c. In the JCL, on any DD DD##CP statement use DISP=OLD so the file is kept at the end of the job.
This contains the File-AID options needed for the compare.
(The Delete disposition must be removed.)

d. Copy the JCL into the File-AID JCL located in the File-AID Compare element.

Depending upon the criteria selected in the File-AID Compare element for the Assert on records compares will show as OK or Failure. Here is an example of a compare that failed because it was checking for records to being deleted.

image2021-8-17_16-4-16.png

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI DevX Workbench for Eclipse 25.04