10.6.20 RECORDTYPE Keyword

The RECORDTYPE keyword specifies the format of records in a file: fixed-length records, variable-length records, segmented records, or stream-type variable-length records. It takes the following form:

RECORDTYPE = typ
typ
Is a character expression with one of the following values:

  • 'FIXED'

  • 'VARIABLE'

  • 'SEGMENTED'

  • 'STREAM_LF'

  • 'STREAM'

  • 'STREAM_CR'

When you open a file, default record types are as follows:

File Type  Default Record Type 
Relative files  'FIXED'  
Direct access sequential files  'FIXED'  
Formatted sequential access files   'STREAM_LF'  
Unformatted sequential access files   'VARIABLE'  

Within segmented records, a Fortran logical record can be greater than 65,535 bytes in length. Only use segmented records for unformatted sequential access to disk or raw magnetic tape files.

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.

For More Information:

For details on record types, see your user manual.


Previous Page Next Page Table of Contents