Defining Output Scans

Output scans are Applications Manager objects used to scan output for text strings that indicate if a task has failed or succeeded. They can be assigned to program types, jobs, and process flow components. Each output scan object includes one or more rules.

Some programs can complete, executing successfully, but not accomplish their intended work. For example, an Oracle report may execute correctly, but return bad data. The only way to tell if the report content is correct is to parse the report text. Output scans are used for this purpose. Output scans are Applications Manager objects used to scan output for text strings that indicate if a task has failed or succeeded. Output scanning supports .zip and .pdf files.

Each output scan includes one or more rules. To use an output scan, you

Add rules to create an output scan.

Creating an Output Scan

To add a new output scan:

  1. From the Output Scan Selector window, click New.
  2. Applications Manager opens the Output Scan window.

    For information on using selector windows, see Adding, Editing, and Deleting Applications Manager Objects.

  3. Enter a name and description for the output scan.
  4. After creating the output scan, add rules.
  5. If you want the tasks associated with this output scan to fail if no rules are met, check the Fail If No Rule Met box.

  6. In the Fail Display Status field, enter the status name you want displayed if a task fails because no rules are met and the Fail If No Rule Met box is checked.

Adding Rules to an Output Scan

To add a rule to an output scan:

  1. From the Output Scan window, click the New button.
  2. Applications Manager opens the Rule window.

  3. Complete the fields in the Rule window using the information in the table below.
    Field Description

    Text

    The text string to search for in the specified output file(s). This field accepts regular expressions. For example if you want to look for the words "TEST" and "FAIL" in either order you could search for TEST.*FAIL|FAIL.*TEST.

    Additionally, the following can be used:

    • . stands for any single character.
    • * stands for any number of the previous character.

    Therefore:

    • .* stands for any number of characters.
    • | stands for the "or" connector.
    • & stands for the "and" connector.

    To include substitution variables or replacement values in the text search, click the { } button.

    Lines from End

    Optionally allows you to specify to start the scan a number of lines from the bottom of the file. This is so you can scan just the end of very long files.

    Match Case

    The case of the text string in the Search Text field must match in the specified output file(s) when this option is checked.

    Files

    Specifies the output files to scan:

    • System Output: Scans only the system output file.
    • Other Output: Scans all registered output files, except the system output file.
    • All Output: Scans all registered output files, including the system output file.
    • Pattern Matching: Scans register files with names matching the pattern you specify. If you enter a pattern that does not match any registered file names, no files will be scanned and no error will be returned. This field allows regular expressions. For wildcard pattern matching, use the % character or .*. For example, enter report% to specify all registered output file names beginning with report. To search for two registered file names, create two rules.

    Action

    Determines whether tasks fail or succeed when the text string in the Search Text field is found in the specified output file(s).

    Display as

    The task status displayed in the Status column in the Explorer window when the text string in the Search Text field is found.

  4. To save the settings and add the rule to the output scan, click OK.
  5. Applications Manager adds the rule to the Rules table on the Output Scan window.

    Rules are evaluated in the order they are listed. If a rule for an output scan evaluates to true, all remaining rules are not evaluated. If you wish to reorder the rules, use the arrow buttons to the right of the list.

Copying Output Scan Rules

You can copy one or more rules from other output scans using the Copy button on the Output Scan window.

Order of Precedence

Output scans can be assigned to program types, jobs, and process flow components. When a task runs, Applications Manager looks at its program type, job, and process flow component assignments—in that order. If specified, each output scan assignment will override the entire set of output scan rules specified by a previous object.

For example, assume that you have defined the following objects as shown below.

Output scan examples.

In this example:

The following output scan settings would be used: