14.1.4. Default Stream Names
A stream name can be a file, a queue, a pipe, or any device that supports
character-based input and output. If the stream is a file or device, the name
can be any valid file specification.
Rexx provides .INPUT and .OUTPUT public objects.
They default to the default
input and output streams of the operating system. The appropriate default
stream object is used when the call to a Rexx I/O function includes no stream
name. The following Rexx statements write a line to the default output stream
of the operating system:
Rexx reserves the names
STDIN,
STDOUT, and
STDERR to allow Rexx functions to refer to
these stream objects. The checks for these names are not case-sensitive;
for example,
STDIN,
stdin, and
sTdIn all refer to the standard input
stream object. If you need to access a file with one of these names,
qualify the name with a directory specification, for example,
\stdin.
Rexx also provides access to arbitrary file descriptors that are already
open when Rexx is called. The stream name used to access the stream object
is
HANDLE:x.
x is the number of the
file descriptor you wish to use. You can use
HANDLE:x as
any other stream name; it can be the receiver of a Stream class method. If
the value of
x is not a valid file descriptor,
the first I/O operation to that object fails.