14.8.3 CONNECT Clause
The CONNECT clause can be used only on indexed files.
CONNECT lets you process different groups of records on
different indexed keys or on the same key without incur-
ring all of the RMS overhead of opening the same file more
than once. For example, a program can read records in an
indexed file sequentially by one key and randomly by an-
other. Each stream is an independent, active series of record
operations.
EXAMPLE: Click to display EXAMPLE.
The channel on which you open the file for the first time is
called the parent . The CONNECT clause specifies another
channel on which you access the same file; connected chan-
nels are called children . More than one OPEN statement
can connect to the parent channel; however, you cannot con-
nect to a channel that has already been connected to another
channel. Do not use the CONNECT clause when accessing
files on remote DECnet nodes.