Transferring Data from Tape
(IN
Operation)
When data
is
transferred from tape,
the
data
is
read from
tape
and
is
assigned
to
the
shared variable
in
the
same sequence as it was written
to
tape. New data
is
read from the tape file and assigned
to
the
shared variable each time
the
shared
variable
is
used. (There
is
no return code assigned
to
the
shared variable after an
IN
operation.)
Using
the
format function
("
) directly on a character shared variable when doing
input operations causes alternate records
to
be skipped.
When doing an I N operation with an exchange data file,
the
following conditions
occur
if a cursor return character (X'9C')
or
end-of-block character
(X'FF')
was
embedded
in
a character vector
that
was written
to
tape:
•
If
a cursor return character was embedded
in
the
character vector,
the
data
will be read from
tape
in
a different sequence than it was written
to
tape.
This condition occurs because
as
the interchange data
is
written
to
tape,
the
system writes an end-of-record character (X'9C') after each character vector
(record)
that
was written
to
tape. The end-of-record character and
the
cursor
return character are the same. When used on tape, this character separates
the
data (records) so
that
it can be read from tape
in
the
same sequence
as
it was
written
to
tape. However, if a cursor return character
is
embedded
in
the
data
that
was written
to
tape,
the
system will recognize it
as
an end-of-record char-
acter when
the
data
is
read from
tape
.
•
If
an end-of-block character was embedded
in
the
character vector, any data
from the embedded end-of-block character
to
the
next
physical record
is
not
read from tape. This condition occurs because
the
system looks
at
the
tape
in
512-byte segments (one physical record). A physical record can be terminated
by an end-of-block character
(X'FF').
When
the
system
is
reading data from
the
tape and an end-of-block character
is
encountered,
the
system skips
to
the
next physical record and continues reading data. Therefore, if an
X'FF'
char-
acter
is
embedded
in
the
data
that
was written
to
tape,
the
system recognizes
it
as
an end-of-block character when
the
data
is
read from tape and skips
ahead
to
the
next
physical record.
Transferring Data
to
the Printer (PRT Operation)
When data (character scalars
or
vectors only)
is
assigned
to
the
shared variable, it
is
printed and a return code
is
assigned
to
the
shared variable. A 0 0 return code indicates
the
data was printed successfully and a nonzero return code indicates
the
opera-
tion
failed. See Return Codes
in
this chapter for a description
of
each return code.
Note: The )OUTSEL
OFF
command
is
automatically issued by
the
system when
doing PRT operations. The )OUTSEL
option
wi" return
to
its previous setting
after
the
PRT operation has been terminated (PRT termination
is
discussed next).