Previous Topic Next topic Print topic


Input and Output

Open PL/I provides two types of Input/Output processing: stream I/O and record I/O. Each type of I/O has its own statements, and each type operates on its own kind of files. Open PL/I can process more than 32,767 records per file and supports UNIX named pipes, which enables the reading and writing of massive data sets - greater than 2 GB - something not normally permitted in UNIX I/O.

A stream file is a sequence of characters organized into lines and pages. When reading or writing a file using stream I/O, the data is treated as if it formed a continuous stream of ASCII characters. Stream files are written by PUT statements and are read by GET statements.

A record file is a set of discrete records that are accessible either sequentially or by keys. When reading or writing a file using record I/O, only one record is processed upon the execution of the I/O statement. Record files are read and written by READ, WRITE, REWRITE, and DELETE statements.

The following sections provide detailed information on the two types of input and output processing available through Open PL/I: stream I/O and record I/O.

Previous Topic Next topic Print topic