Previous Topic: &MAIPUT

Next Topic: &MAIREPL


&MAIREAD

Waits for the next data stream.

&MAIREAD [ ANY | PLU | SLU ] [ WAIT=nnnn ]

Waits for the arrival of the next data stream from the PLU (application), SLU (terminal) or either, or for a specified time interval to expire.

Operands:

ANY

Suspends execution of the NCL procedure until the next data stream arrives from either the PLU or the SLU.

PLU

Suspends execution of the NCL procedure until the next data stream arrives from the PLU (application).

SLU

Suspends execution of the NCL procedure until the next data stream arrives from the SLU (terminal).

nnnn

Specifies a time interval in seconds after which the procedure will regain control if no data stream of the requested type arrives. Range is 1 to 9999.

Examples: &MAIREAD

&MAIREAD 
&MAIREAD ANY 
&MAIREAD PLU 
&MAIREAD SLU WAIT=60

Notes:

Following the receipt of a data stream, it is searched for a particular string using &MAIFIND, sent onward using &MAICONT, or deleted using &MAIDEL.

If two &MAIREAD statements are issued without an intervening &MAICONT or &MAIDEL, an implied &MAICONT CONT VIEW=OPT is performed.

If an &MAIREAD statement specifies the PLU operand only, terminal input will bypass the procedure and be sent on to the application. Conversely, if an &MAIREAD statement specifies the SLU operand only, output from the application will bypass the procedure and be sent on to the terminal.

If any specified time interval expires before the requested data stream arrives, &MAIFRLU will be a null value; otherwise, it contains either PLU or SLU according to the source of the data stream.

More information:

&MAICONT

&MAIFIND

&MAIDEL

&MAIFRLU