Read Spool File – Source Reference


The Read Spool File <SpoolFile> element is a Referenceable element that is used for extracting data from a spool file for a job at a mainframe. The content can be used to verify that a program has written expected data to the spool file during execution. Only spool files created with the userid executing the test scenario are supported.
Each line of a spool file will always start with a space. This is often hidden when viewing the spool file in ISPF. Remember to consider the space if setting up verification expressions.
Syntax
The syntax of a Read Spool File element is

<SpoolFile ddname="<ddname>" stepname="<stepname>" id="<id>" jobid=î<jobid>"/>

The ID attribute is required and used by other elements using the content of the spoolfile. The ddname specifies the ddname of the job step, while the stepname specifies the step name. The optional jobid specifies a jobid from which the spoolfile must be extracted. Normally this should not be used and the spool file will be retrieved from the latest job executed from the test scenario.
Examples
Below is an example of extracting the spool file from the latest job for the step name PROGRAM and the dd name SYSOUT. Other elements can refer to the data by using the ID spoolId.

<SpoolFile ddname="SYSOUT" stepname="PROGRAM" id="spoolId" />

 

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