can be any data field name from the input file or a work area generated before the SELECT is executed. It can be qualified to base selection on a subfield within the field, as, for example, ACCOUNT/NUMBER(1,3).
In a conditional test, when two field names are entered, the data in the second field is compared with the data in the first field.
Example:
SELECT 6.PASSWORD/COUNT EQ 6.PASSWORD/LIMIT
This example selects any record in which the password limit is the same as the password count.
Valid comparison operators and their descriptions are shown in the following table. Either the alphabetic letters or special character symbols can be used at any time.
|
Letters |
Symbols |
Description |
|---|---|---|
|
EQ |
= |
is equal to |
|
NE |
*= |
is not equal to |
|
GT |
> |
is greater than |
|
LT |
< |
is less than |
|
EG/GE |
=> |
is equal to or greater than |
|
EL/LE |
=< |
is equal to or less than |
|
NG |
*> |
is not greater than |
|
NL |
*< |
is not less than |
Enter a numeric value or a character literal.
A numeric value can include a leading minus sign or an embedded decimal point when appropriate.
A character literal can be enclosed in single quote marks (' '). It must be enclosed in quote marks if it includes blank spaces or special characters. For example:
SELECT ELAPS TIME GT 1800 OR APPL CODE(1,3) EQ 'PDN'
BLANK, BLANKS, SPACE, SPACES, and LOVALUE are special system reserved words. CA JARS Wizard checks for a data field containing nothing but blank spaces or binary zeros. For example:
SELECT DYNAM/USERID EQ BLANK
This selects records in which the DYNAM USERID field contains a blank space. In this case, the field is eight characters, but it may be any length.
A SELECT statement can have 60 conditional tests connected by AND or OR. If two conditional tests are connected by AND, both must be satisfied for the record to be selected. If they are connected by OR, the record is selected if either is satisfied. Parentheses can be used to group related conditional tests.
Example:
SELECT ELAPS TIME GT 1800 OR ACTIVE TIME GT 900 AND APPL CODE EQ 'ABC123' SELECT ELAPS TIME GT 1800 OR (ACTIVE TIME GT 900 AND APPL CODE EQ 'ABC123') SELECT (ELAPS TIME GT 1800 OR ACTIVE TIME GT 900) AND APPL CODE EQ 'ABC123'
The first and second statements achieve identical results. CA JARS Wizard selects two types of records:
The third statement selects a smaller group of records: the application code must be ABC123, and either one of the two time tests must be satisfied (it doesn't matter which one).
indicates that all primary input records are to be selected for processing, irrespective of record type.
specifies that primary input records with a match on the secondary field are to be selected.
n is a value from 1 through 3 used to refer to the matching function against the first secondary file, the second secondary file, or the third secondary file. If n is omitted, all nonglossary files are considered in the selection process
The primary input records without a match on the secondary file are to be selected. n is a value from 1 through 3, as described for MATCHED n.
specifies that if two or more consecutive records contain identical values on the specified field name, the second and subsequent records containing the identical value are selected.
specifies that the first record in a control group defined by the specified field name is to be selected.
| Copyright © 2012 CA. All rights reserved. |
|