|
PROGRESS stage v1.0 |
Pipelines v1.6 |
|
Purpose, Operands, Streams used, Usage notes, Examples, See also |
|
Syntax |
_1000____>>__PROGRESS__|_________|______________________________________________________________><
|_numrecs_|
|
Purpose |
Use the PROGRESS stage to write a progress count record after every numrecs input records.
PROGRESS reads records from its primary input stream, incrementing a counter each time a record is read. When numrecs records have been read, PROGRESS creates a count record which it writes to either its primary or secondary output stream. When its secondary output stream is not connected, PROGRESS writes the count record to its primary output stream and discards the records from its primary input stream. If both its primary and secondary output streams are connected, PROGRESS copies its primary input stream records to its primary output stream and writes the count record to its secondary output stream.
|
Operands |
|
● |
is an unsigned integer which specifies the number of
records to read before writing a count record. The default the value for numrecs is 1000. |
|
Streams used |
The following streams are used by the
PROGRESS stage:
|
Stream
|
Action |
|
|
|
|
Primary input
stream |
PROGRESS reads records from its primary
input stream. |
|
Primary output
stream |
If its secondary output stream is not connected, PROGRESS writes the
count record to its primary output stream. If its secondary output stream is
connected, PROGRESS copies its primary input stream records to its primary
output stream. |
|
Secondary output
stream |
If its
secondary output stream is connected, PROGRESS writes the count record to its
secondary output stream. |
|
Usage notes |
|
1) |
When
its secondary output stream is not connected, PROGRESS delays every set of numrecs records. If its secondary
output stream is connected, PROGRESS does not delay the primary output stream
records. |
|
2) |
If
the PROGRESS stage discovers that all of its output streams are not
connected, the PROGRESS stage ends. |
|
3) |
If the number
of input records is less than numrecs,
PROGRESS does not produce a count record. |
|
4) |
The format of the
count record is as follows: hh:mm:ss record-count |
|
5) |
PROGRESS verifies
that its secondary input stream is not connected and then begins execution. |
|
Examples |
The following
pipeline copies the file in.txt to out.txt. After every 50 records have
been copied, the pipeline displays the total number of records copied so far.
pipe (endchar ?)
< in.txt | a: progress 50 | > out.txt ? a: | console
Reference the
following link for additional information:
|
History of change |
None.
|
|