Problem Note 4448: Source code, %INCLUDE records and DATALINES are truncated at 256 bytes
If you are reading data with DATALINES, or have source statements
which are longer than 256 bytes, SAS truncates the data or the source
statement at 256 bytes.
If source statements are longer than 256 bytes, SAS may generate an
error based on any improper syntax resulting from the source statement
truncation or issue a warning message indicating a truncated record.
If source statements are brought into the program with a %INCLUDE statement you can change the default 256 byte length by specifying the LRECL= option directly in the %INCLUDE statement following the / (forward slash). For example:
%include "c:\myfiles\mySASsource" / lrecl=500;
You can also use a FILENAME statement to assign a fileref to the file which contains the source code and specify an appropriate value for the LRECL= option, then use the fileref on the %INCLUDE statement. For further information on the %INCLUDE statement as well as limitations on length or possible truncated data, records, or source lines see the following SAS Notes: #005953, #008328 , #0015883 and #039619 .
If the DATALINES are longer than 256 bytes, the variables whose values
are past the 256th byte in the logical record are assigned missing
values. SAS does not generate a message in the SAS Log indicating
that one or more records were truncated. In addition, you cannot
specify the LRECL= option on the INFILE statement with the DATALINES
file specification to prevent the truncation.
To circumvent this problem either:
1) copy the DATALINES to an external file and use the path to
that file (surrounded by quotes) instead of DATALINES as the
file specification on the INFILE statement. This allows you
to use the LRECL= option to specify the maximum logical
record length, or
2) split the DATALINES so that each segment is less than 256
bytes, and the break occurs at the same variable(s) for each
logical record, then use line pointer controls (/) on your
INPUT statement to advance input pointer through all the
segments that comprise the logical record.
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows 95/98 | 8 TS M0 | |
| Microsoft Windows NT Workstation | 8 TS M0 | |
| Microsoft Windows 2000 Server | 8 TS M0 | |
| Microsoft Windows 2000 Professional | 8 TS M0 | |
| Microsoft Windows 2000 Advanced Server | 8 TS M0 | |
| Microsoft Windows 2000 Datacenter Server | 8 TS M0 | |
| OpenVMS VAX | 8 TS M0 | |
| 64-bit Enabled Solaris | 8 TS M0 | |
| Solaris | 8 TS M0 | |
| IRIX | 8 TS M0 | |
| z/OS | 8 TS M0 | |
| OS/2 | 8 TS M0 | |
| HP-UX | 8 TS M0 | |
| ABI+ for Intel Architecture | 8 TS M0 | |
| CMS | 8 TS M0 | |
| 64-bit Enabled AIX | 8 TS M0 | |
| 64-bit Enabled HP-UX | 8 TS M0 | |
| OpenVMS Alpha | 8 TS M0 | |
| Tru64 UNIX | 8 TS M0 | |
| AIX | 8 TS M0 | |
*
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: | medium |
| Topic: | Data Management ==> Access ==> External I/O SAS Reference ==> Statements ==> Program Control ==> %INCLUDE Common Programming Tasks
|
| Date Modified: | 2010-05-17 13:36:02 |
| Date Created: | 2001-03-06 16:37:00 |