(Area 4A,4B)
The SELECT command specifies the criteria used to determine which input records are to appear in the output report (if operating in Primary or Secondary mode) or in the output file (if operating in the Write-Only mode). The format of the SELECT command is as follows:
SELECT Command
►►─ SELECT ─┬─────────┬─┬─ logical expression ─┬──────────────────────────────►◄ └─ 'tag' ─┘ └─ ALL ────────────────┘
Is a single character within the range of A—Z, used to identify which SELECT command caused the record or set of records to be selected. The system can then reference this tag character in any subsequent PRINT commands within the same report group to permit selection printing or accumulation.
Specifies that all records are to be selected for processing, regardless of their content.
Specifies the logical constraints to apply before the system selects this record set for processing. You must code this parameter following the standard Reporting Facility conventions for logical expressions.
Note the following:
Example
This command sequence causes all records to be selected:
SELECT 'A' WHEN AMOUNT-FIELD LT 100 SELECT 'B' WHEN AMOUNT-FIELD LTE 200 SELECT 'C' ALL PRINT A;AMOUNT-FIELD B;AMOUNT-FIELD C;AMOUNT-FIELD
The system tags any record with an AMOUNT field containing a value of less than 100 with an A. When the AMOUNT field is in the range of 100—200, the record is tagged with a B; otherwise, it is tagged with a C.
|
Copyright © 2014 CA.
All rights reserved.
|
|