/sys$common/syshlp/helplib.hlb FORTRAN, Statements, ENDFILE *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Writes an end of file record to a file. An end of file record consists of one byte with the ASCII value 26 (CTRL/Z). An end-file record can be written only to sequential organization files that are accessed as formatted sequential files or unformatted segmented sequential files. Statement format: ENDFILE ([UNIT=]u[,ERR=s][,IOSTAT=ios]) ENDFILE u u Is an integer variable or constant specifying the logical unit number of the file, optionally prefaced by UNIT=. UNIT= is required if unit is not the first I/O specifier. s Is the label of a statement to which control is transferred if an error occurs, prefaced by ERR=. ios Is an integer variable to which the completion status of the I/O operation is returned, prefaced by IOSTAT= (a zero if no error occurs; a positive value if an error occurs). If the unit specified in the ENDFILE statement is not open, the default file is opened for unformatted output. An end-of-file record consists of one byte with the ASCII value 26 (Ctrl/Z). An end-of-file record can be written only to sequential organization files that are accessed as formatted sequential files or unformatted segmented sequential files. An ENDFILE statement must not be specified for a file that is open for direct access. End-of-file records should not be written in files that are read by programs written in a language other than Fortran.
|