Terminal I/O changes

The library will now use the actual recfm and lrecl specified in the fopen() or freopen() call that opens a terminal file. Incomplete new records in fixed binary and record files are padded with blank characters until they are full, and the __recfmF flag is set in the fldata() structure. Previously, MVS™ terminals unconditionally set recfm=U. Terminal I/O did not support opening files in fixed format.

The use of an LRECL value in the fopen() or freopen() call that opens a file sets the record length to the value specified. Previous releases unconditionally set the record length to the default values.

For input text terminals, an input record now has an implicit logical record boundary at LRECL if the size of the record exceeds LRECL. The character data in excess of LRECL is discarded, and a '\n' (new-line) character is added at the end of the record boundary. You can now explicitly set the record length of a file as a parameter on the fopen() call. The old behavior was to allow input text records to span multiple LRECL blocks.

Binary and record input terminals now flag an end-of-file condition with an empty input record. You can clear the EOF condition by using the rewind() or clearerr() library function. Previous products did not allow these terminal types to signal an end-of-file condition. The use of a RECFM value in the fopen() or freopen() call that opens a file sets the record format to the value specified. Previous releases unconditionally set the record format to the default values.

When an input terminal requires input from the system, all output terminals with unwritten data are flushed in a way that groups the data from the different open terminals together, each separated from the other with a single blank character. The old behavior is equivalent to the new behavior, except that two blank characters separate the data from each output terminal.