FIX: Problem Reading Direct-Access File When RECL > BLOCKSIZE (68030)
The information in this article applies to:
- Microsoft FORTRAN Compiler for MS-DOS 4.01
- Microsoft FORTRAN Compiler for MS-DOS 4.1
- Microsoft FORTRAN Compiler for MS-DOS 5.0
- Microsoft FORTRAN compiler for OS/2 4.1
- Microsoft FORTRAN compiler for OS/2 5.0
This article was previously published under Q68030 SYMPTOMS
An application that reads records from a file produces incorrect
results. This problem does not occur when the application is
compiled with Microsoft FORTRAN versions 4.0 or 4.0a for MS-DOS.
CAUSE
The application opens a direct access file with BLOCKSIZE set to a
value that is less than the RECL (record length).
RESOLUTION
Perform one of the following three methods to work around this
problem:
- Modify the source code to use a record length less than or equal
to the BLOCKSIZE (the default BLOCKSIZE value is 1024 bytes).
- Modify the source code to access the direct-access file with a
variable or group of variables, the length of which in bytes
matches the record length. This technique avoids partial record
access.
- Modify the source code to specify a REWIND statement following
any partial access to a record. The REWIND statement realigns
the file pointer to the beginning of the file. (The BACKSPACE
statement does not appear to solve this problem.)
STATUS
Microsoft has confirmed this to be a problem in FORTRAN versions
4.01, 4.1, and 5.0 for MS-DOS and versions 4.1 and 5.0 for OS/2.
This problem was corrected in FORTRAN version 5.1 for MS-DOS and
OS/2.
Modification Type: | Major | Last Reviewed: | 12/1/2003 |
---|
Keywords: | kbfix KB68030 |
---|
|