HOLE
v1.1
v2.1

Purpose, Argument, Streams, Usage, Examples, Related

Syntax

>>──┬─HOLE─┬─────────────────────────────────────────────────────────────────────────>< 
    └─SINK─┘
Purpose

Use the HOLE stage to read all input records and discard them. HOLE reads records from all of its connected input streams and does not write any records to any output stream. The HOLE stage terminates when all of its input streams have reached end-of-file.

Argument
Streams

Stream
Action
Primary input
HOLE reads records from all connected input streams.
Primary output
Although HOLE does not write any records to its primary output stream, the output stream stays connected until all input streams have reached end-of-file.

Usage
  1. HOLE does not delay the records. HOLE does not write any output records. All input records are consumed and discarded.

  2. HOLE pulls records through a pipeline when an earlier stage would otherwise end because of receiving an end-of-file on its output stream.

  3. HOLE verifies that its secondary input and secondary output streams are not connected and then begins execution.
Examples
  1. The following pipeline collates the two input files; master.txt and detail.txt, producing two output files; missing.txt and new.txt. The HOLE stage discards all its input records and only ends once it receives an end-of-file. This ensures that the COLLATE stage does not end prematurely.

    **** Top of file ****
    Address Rxpipe
    'pipe (endchar ?)', '< master.txt', /* Read master input file. */ '| sort', /* COLLATE expects a sorted input. */ '| c: collate', /* Find matches. */ '| hole', /* Discard matching records. */ '?', '< detail.txt', /* Read detail input file. */ '| sort', /* COLLATE expects a sorted input. */ '| c:', /* Define secondary streams for COLLATE. */ '| > missing.txt', /* Write missing records. */ '?', 'c:', /* Define tertiary output for COLLATE. */ '| > new.txt', /* Write new records. */ '?', 'literal /Wait..collating./', /* Console info message. */ '| console' /* Write it to the console. */
    Exit 0 **** End of file ****
Related

DROP, DUPLICATE TAKE

History

Version
Date
Action
Description
Pipelines
1.1
??.??.2025
changed
Application-wide rewrite
2.1
1.0
06.09.2007
created
First version.
1.0