Previous Topic: KEY ParameterNext Topic: Examples


SELECT and BYPASS Parameters

SELECT and BYPASS are optional parameters that select records to be processed based upon specified selection criteria. By using SELECT or BYPASS parameters, you can produce reports that contain only the required information (for example, all programs created after a particular date).

Syntax

   Col 2
       ▼
►►──┬─ SELect ─┬─┬─ BUFFER ───────────────────────────────────┬───────────────►
    └─ BYPass ─┘ └─ record-name level-number IN PATH path-id ─┘

 ►─ WHEN boolean-expression ──────────────────────────────────────────────────►◄

Expanded Syntax for boolean-expression

►►── operand test-operation ─┬─ operand TO operand ─┬─────────────────────────►
                             │ ┌───────────┐        │
                             └─▼─ operand ─┴────────┘

   ┌─────────────────────────────────────────────────────────────┐
 ►─▼─┬─ AND ─┬─ operand test-operation ─┬─ operand TO operand ─┬─┴────────────►◄
     └─ OR ──┘                          │ ┌───────────┐        │
                                        └─▼─ operand ─┴────────┘

Parameters

SELect

Selects input data. SELECT is coded starting in column 2. One or more SELECT parameters can be specified per run, but you can not use both SELECT and BYPASS (see below) in a run.

BYPass

Bypasses input data. BYPASS is coded starting in column 2. One or more BYPASS parameters can be specified per run, but you can not use both SELECT (see above) and BYPASS in a run.

BUFFER

Applies the selection criteria to the contents of the completed input buffer (rather than to a specific record type).

record-name

(D-, C-, and AREPORTs only) Applies the selection criteria to a specific database record. Record-name is the name of a database record, which must also appear on a PATH parameter for the report.

level-number

Identifies the occurrence of record in the path; the default is 1.

IN PATH path-id

Identifies the path containing the database record. Path-id is a 2-byte primary path identifier. If no path id is specified, the selection criteria apply to all preceding PATH parameters that specify the named record.

WHEN boolean-expression

Specifies the test criteria to be applied to each record.

operand

Specifies an alphanumeric, numeric, or hexadecimal literal or the name of a data item:

  • An alphanumeric literal is a value (up to 64 characters) that consists of letters, digits, and/or special characters in any combination. An alphanumeric literal must be enclosed in single quotation marks.
  • A numeric literal is a number (up to 31 digits) that can be preceded by a sign and can contain an embedded or trailing decimal point.
  • A hexadecimal literal is a hexadecimal string (up to 64 characters) preceded by X and enclosed in single quotation marks (for example, X'0A14').
  • A data-item name is the name of a field in a record used in report processing. Only names specified in the REC parameter field definitions for the report can be referenced. For sample REC parameters, see the sample Input Parameter Listing earlier in this chapter. For a description of these fields, see the CA IDMS Dictionary Structure Reference Guide.

The data type of the left operand must match the data type of the right operand in a boolean expression. To list operands on the right side of the expression:

  • Enclose the list in parentheses
  • Separate one operand from another with either a blank or a comma

For example:

MAP-NAME-098 EQ ('JKDMAP','DEHMAP','TDBMAP').
test-operation

Specifies a comparison operator:

  • EQ(E)(=)—The value of the left operand is equal to the value of the right operand.
  • NE(N)(#)—The value of the left operand is not equal to the value of the right operand.
  • GT(H)(>)—The value of the left operand is greater than the value of the right operand.
  • LT(L)(<)—The value of the left operand is less than the value of the right operand.
  • GE(>=)(=>)—The value of the left operand is greater than or equal to the value of the right operand.
  • LE(<=)(=<)—The value of the left operand is less than or equal to the value of the right operand.
operand TO operand

Specifies a range of values to which the left operand is to be compared. Operand must be a literal value or the name of a data item, as defined under operand above. The specified range must be enclosed in parentheses. For example, MAP-NAME-098 EQ ('A' TO 'G').

AND/OR

Allows the specification of additional test criteria:

  • AND—A record is selected for processing if it meets both criteria connected by AND.
  • OR—A record is selected for processing if it meets either or both criteria connected by OR.

Continuing a SELECT or BYPASS Parameter

If the SELECT or BYPASS parameter does not fit on one line, code an asterisk (*) in column 1 of each continuation line.