Previous Topic

Next Topic

Book Contents

Book Index

Rule Logic

The INPUT block reads a report in page mode from the sysout file referenced by the SYSUT2 DD statement. This block contains two independent WHEN statements. The first one looks for detail lines and sums the appropriate column entries. The second one looks for the total line and extracts the appropriate column totals.

Table 302 SolveWare Rule Logic (1)

Rule

Description

First WHEN statement:

When column 6 contains a hyphen, sum the quantity extracted from the QNTY AVAIL field in Local variable QTYA. Rule 2B does the same for more than one column.

Second WHEN statement:

When TOTALS: is found in columns 1 to 20, extract the total quantity in columns 50 to 60. Store the extracted total in the QTYB Local variable. Rule 2B does the same for more than one total value.

The CHECK block compares QTYA and QTYB.

If QTYA does not equal QTYB:

  • Print the calculated and extracted totals in the balancing report.
  • Use the Shout facility to announce that the job identified in the SYSJOBNAME System variable is not balanced.
  • Terminate with NOTOK rule status and a condition code of 555.

If QTYA does equal QTYB:

  • Print an IN BALANCE message containing the SYSDATE and SYSJOBNAME in the balancing report.
  • Terminate with OK rule status and a condition code of 0.

Parent Topic

Sample Rules