Problem Note 5411: Using RECFM=N with INFILE options MISSOVER or TRUNCOVER may cause
incorrect results
When using RECFM=N in conjunction with MISSOVER, STOPOVER, or
TRUNCOVER may cause incorrect results to occur. It is possible for
valid values to be set to missing (MISSOVER) or to be truncated and
padded with blanks (TRUNCOVER), or for SAS to stop processing
(STOPOVER).
The LRECL= option determines the size of the input buffer. If LRECL=
is not specified, the default value is 256. In Version 6, for every
variable read, a reposition in the file is performed, the input
buffer's data is moved forward to the first position, and the buffer
is refilled with data up to the length specified by LRECL=. In
Version 6, character variables are limited to a length of 200, so even
if no LRECL= option is specified the buffer always contains the
default length of 256 bytes. Since variables cannot exceed 200 bytes,
each variable can be satisfied by the contents of the buffer. Even if
MISSOVER, STOPOVER, or TRUNCOVER is specified, the option is ignored
because the input buffer always contains enough data for each
variable.
Starting in Version 7, the maximum length of character variables
increased to 32,767 bytes. If the input variable is requesting a
number of bytes greater than the LRECL= value, the variable cannot be
satisfied by the current input buffer. In this circumstance, if
MISSOVER, STOPOVER, or TRUNCOVER is specified, SAS uses the option as
if a binary stream read (i.e. RECFM=N) is not being used. If there is
not enough data in the input buffer and MISSOVER or TRUNCOVER is
specified, the variable is set to missing, or the value is truncated
and padded with blanks, respectively. If you remove the option, SAS
performs the default FLOWOVER behavior, which repositions the file and
refills the input buffer, thus producing correct results.
Beginning in SAS Release 8.1, a performance enhancement was added for
RECFM=N processing whereby SAS does not reposition the file and refill
the input buffer for every variable read. A check is performed to see
if the value can be satisfied from the input buffer. If there is
enough data in the buffer then a reposition is not performed. If the
default FLOWOVER behavior is used, correct results are produced.
The circumvention is to not specify MISSOVER, STOPOVER or TRUNCOVER
option on the INFILE when using RECFM=N.
Operating System and Release Information
| SAS System | Base SAS | 64-bit Enabled AIX | 8.2 TS2M0 | 9.1 TS1M0 |
| Microsoft Windows XP Professional | 8.2 TS2M0 | 9.1 TS1M0 |
| Microsoft Windows 2000 Server | 8 TS M0 | 9.1 TS1M0 |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | 9.1 TS1M0 |
| Microsoft Windows NT Workstation | 8 TS M0 | 9.1 TS1M0 |
| Microsoft Windows 2000 Professional | 8 TS M0 | 9.1 TS1M0 |
| Microsoft Windows 2000 Datacenter Server | 8 TS M0 | 9.1 TS1M0 |
| Solaris | 8.2 TS2M0 | 9.1 TS1M0 |
| Microsoft Windows 2000 Advanced Server | 8 TS M0 | 9.1 TS1M0 |
| 64-bit Enabled Solaris | 8.2 TS2M0 | 9.1 TS1M0 |
| z/OS | 8 TS M0 | 9.1 TS1M0 |
| HP-UX | 8.2 TS2M0 | 9.1 TS1M0 |
| Linux | 8.2 TS2M0 | 9.1 TS1M0 |
| 64-bit Enabled HP-UX | 8.2 TS2M0 | 9.1 TS1M0 |
| OpenVMS Alpha | 8 TS M0 | 9.1 TS1M0 |
| Tru64 UNIX | 8 TS M0 | 9.1 TS1M0 |
| AIX | 8.2 TS2M0 | 9.1 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | high |
| Topic: | Data Management ==> Access ==> External I/O
|
| Date Modified: | 2001-07-12 10:50:31 |
| Date Created: | 2001-07-11 15:27:24 |