READTO subcommand v1.0

Pipelines v2.0

 

Purpose, Operands, Usage notes, Examples, See also

Home

 

Syntax

 
>>__READTO__ _________ ________________________________________________________________><
            |_varname_|
 

Purpose

 

Use the READTO subcommand to read the next record from the input stream. If an ooRexx variable is specified, the variable is set to the contents of the record. READTO consumes records; once a record has been read by READTO, it is discarded.

 

Operands

 

    

varname

is the name of the variable in which READTO is to place the contents of the input record. The variable may index an array or a stem. The name you specify must be a valid name for an ooRexx variable. If you do not specify varname, no variable is set.

 

Usage notes

 

     1)

The record that READTO reads is consumed immediately; releasing the calling pipeline/CALLPIPE from it’s suspended state.

 

     2)

Use READTO without specifying varname if you wish only to set a return code indicating whether there is another record in the input stream.

 

     3)

When the READTO subcommand determines that there are no more records to read; it sets a returncode of 12 (end-of-file), and the variable specified by varname is dropped.

 

Examples

 

None.

 

See also

 

Reference the following links for additional information:

 

ARRAY, OUTPUT, PEEKTO, VARIABLE

 

History of change

 

None.