This chapter describes features of the input and output statements used in record-oriented data transmission. Those features of PL/I that apply generally to record-oriented or stream-oriented data transmission, including declaring files, file attributes, and opening and closing files, are described in Input and output. For syntax information about the ENVIRONMENT attribute, refer to ENVIRONMENT attribute. For details about environment characteristics and record I/O data transmission statements for each data set organization, refer to the Programming Guide.
In record-oriented data transmission, data in a data set is a collection of records recorded in any format acceptable to the operating system. No data conversion is performed during record-oriented data transmission. On input, the READ statement either transmits a single record to a program variable exactly as it is recorded in the data set, or sets a pointer to the record. On output, the WRITE, REWRITE, or LOCATE statement transmits a single record from a program variable exactly as it is recorded internally. If the information transmitted to the file has a length N which is less than the established record length M, the resulting value of the last M-N bytes of the record is undefined.