REVERSE stage v1.0

Pipelines v1.6

 

Purpose, Operands, Streams used, Usage notes, Examples, See also

Home

 

Syntax

 

>>__REVerse____________________________________________________________________________><

 

Purpose

 

Use the REVERSE stage to reverse the contents of records on a character-by-character basis. The first character of the input record becomes the last character of the output record, the second character becomes the second-to-last character, and so on. REVERSE reads records from its primary input stream and writes each record in reverse character order to its primary output stream.

 

Operands

 

None.

 

Streams used

 

The following streams are used by the REVERSE stage:

 

Stream

Action

 

 

Primary input stream

REVERSE reads records from its primary input stream.

Primary output stream

REVERSE writes each record in reverse character order to its primary output stream.

 

Usage notes

 

     1)

REVERSE does not delay the records.

 

     2)

If the REVERSE stage discovers that its primary output stream in not connected, the REVERSE stage ends.

 

     3)

When reversing the order of the characters in a record, any spaces that are part of the record (including trailing spaces) are reversed as well.

 

     4)

REVERSE verifies that its secondary input and output streams are not connected and then begins execution.

 

Examples

 

The following pipeline reads records from the keyboard and displays them reversed.

 

C:\>pipeconsole | reverse | console”
 

See also

 

Reference the following link for additional information:

 

SPECS
 

History of change

 

None.