Previous Topic: File Matching

Next Topic: Sorting


Selecting and Bypassing Records

CA JARS Wizard can process all records from an input file. However, the most meaningful reports are produced if they are restricted to records that meet special conditions.

For example, it may be necessary to list data for all job steps that run longer than five minutes. The requirement is expressed in a SELECT statement, as follows:

SELECT ACTIVE TIME GT 300

This sample statement causes this product to examine the data in the ACTIVE TIME field of each record in the input file. If the value is greater than 300 seconds, it continues processing the record. If not, it bypasses the record.

None of these actions has any effect on the input file itself. The input file is not altered by use in a CA JARS Wizard run.

The result of a SELECT operation is that the run processes only those records that meet the conditions specified by the SELECT statement.

Selection can be based on any number of conditions.

Example:

SELECT ACTIVE TIME GT 600 AND LINES PRINTED LT 1000 AND
CHARGE CODE EQ 'B5' OR CHARGE CODE EQ 'B6'

This sample statement selects only those records in which the active run time is greater than 600 seconds or ten minutes, the number of print lines is less than 1,000, and the CHARGE CODE is either B5 or B6. All other records in the file are ignored.

The use of selection criteria is particularly important when processing a large file. A complete listing of such a file can produce a large volume of output. The SELECT statement reduces the volume by restricting the scope of the report.

CA JARS Wizard also has a REJECT statement. It can be used in place of SELECT when it is easier to specify which records to bypass. For example, the following two statements have identical results:

SELECT ACTIVE TIME GT 300
REJECT ACTIVE TIME LE 300

Selection and rejection may be performed at various times in the processing cycle. A suffix code designates the time, for example:

SELECT(P)/REJECT(P)

Record selection takes place before the input file is sorted and before any preSORT computations.

Note: The run MUST contain a SORT statement.

SELECT/REJECT

Record selection takes place before the input file is sorted, (assuming the run contains a SORT statement).

SELECT(S)/REJECT(S)

Selection takes place after the SORT.

SELECT(L)/REJECT(L)

Selection criteria in these statements applies solely to the report listing. Records can be selected for processing and bypassed for printing. (This applies to detail lines only.)