Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Selecting records or blocks

&pagelevel(4)&pagelevel

Records (in the case of file copying) or blocks (in the case of tape editing) can be selected for further processing. The selection is made by specifying a logical expression in the SELECT-INPUT-RECORDS statement; the following sequence of operations is required:

  • Compare individual fields of a record or block with a selected literal (constant).

  • Compare an internal PERCON block counter, byte counter or record counter (see "Literals ") with a selected literal.

  • Check the data format of a field (numeric, alphabetic).

  • Check whether the records have been sorted in ascending or descending order.

  • Check the characters contained in a field against a table of permissible characters.

The following comparison operators may be used:

  • equal to

  • less than

  • less than or equal to

  • greater than

  • greater than or equal to

  • not equal to

Logical expressions may be generated on the basis of several such comparisons. Two logical operators may be used:

  • AND

  • OR

The expression is processed from left to right, “AND” having priority over “OR”. The input record/block is not transferred to the output file specified via OUTPUT-LINK-NAME unless the comparison yields the value “true”.

The order in which expressions are compared can be influenced by the use of parentheses.

Records or blocks which do not match any of the selection criteria can be transferred to socalled “residual files”.