VMS Help FORTRAN, Statements, OPEN, RECORDTYPE *Conan The Librarian (sorry for the slow response - running on an old VAX) |
RECORDTYPE = typ typ Is a character expression with one of the following values: 'FIXED' All records are one size. Short records are padded with blanks (formatted files) or zeros (unformatted files). 'VARIABLE' Records can vary in length. 'SEGMENTED' A record consists of one or more variable length records, which can exist in different physical blocks. Valid only for unformatted, sequential files with sequential access. 'STREAM' Data is not grouped into records and contains no control information. 'STREAM_CR' Variable-length records whose length is indicated by carriage-returns embedded in the data. 'STREAM_LF' Variable-length records whose length is indicated by line-feeds (new lines) embedded in the data. When you open a file, default record types are as follows: +-------------------------------------+---------------------+ | File Type | Default Record Type | +-------------------------------------+---------------------+ | Relative or indexed files | 'FIXED' | | Direct access sequential files | 'FIXED' | | Formatted sequential access files | 'VARIABLE' | | Unformatted sequential access files | 'SEGMENTED' | +-------------------------------------+---------------------+ A segmented record consists of one or more variable-length records. Using segmented records allows a Fortran logical record to span several physical records. Only unformatted sequential access files with sequential organization can use segmented records. You cannot specify <SINGLE_QUOTE>SEGMENTED<SINGLE_QUOTE> for any other file type. If you do not specify the RECORDTYPE parameter when you are accessing an existing file, the record type of the file is used --- except for unformatted sequential-access files with sequential organization and variable-length records. These files have a default of 'SEGMENTED'. If you do specify the RECORDTYPE parameter when you are accessing an existing file, the type that you specify must match the type of an existing file. In fixed-length record files, if an output statement does not specify a full record, the record is filled with spaces in a formatted file and zeros in an unformatted file. You cannot use an unformatted READ statement to access an unformatted sequential organization file containing variable-length records, unless you specify the corresponding RECORDTYPE value in your OPEN statement. Files containing segmented records can be accessed only by unformatted sequential Fortran I/O statements.
|