This chapter describes, through program examples, various
ways that you can use file system intrinsics to transfer data to
your program from a disk file or device file. This chapter is intended
to illustrate topics introduced in chapter 7, "Record Selection
and Data Transfer". This chapter is divided into the following topics:
"Sequential Access and Random Access" discusses two common methods
of record selection and data transfer, and uses examples to
illustrate the use of the FREAD and FREADDIR
intrinsics.
"Reading from $STDIN" discusses how your program can use the
READ, READX, and FREAD intrinsics to read
data from the job/session standard input device, $STDIN. An
example illustrates the use of the READ intrinsic to read a character
string from $STDIN.
"Reading from a Magnetic Tape File" provides an example of using
the FREAD intrinsic to read data from file located on
magnetic tape.
"Reading a File Label from a Labeled Tape File" provides an
example of using the FREADLABEL intrinsic to read a
user-defined file label located on a labeled magnetic tape
file.