Usage Note 5953: In batch mode, syntax error messages or "WARNING: Truncated record" might occur if the line length of source code exceeds 256 characters
When you run a SAS® program that contains a line of code with more than 256 characters and it is submitted in batch mode, you might encounter one of the syntax errors similar, but not limited to, the following:
ERROR 79-322: Expecting a).
ERROR 180-322: Statement is not valid or it is used out of proper order.
In SAS® 8.2 (TS2M0), you see an additional message before the truncated line of code:
WARNING: Truncated record.
To circumvent the problem, reduce the line length of your code to less than 256 characters. For further information and other workarounds, see the following SAS Notes:
- Problem Note 4448, "Source code, %INCLUDE records, and DATALINES are truncated at 256 bytes"
- Usage Note 8328, "%INCLUDE of file with LRECL greater than 2000 causes problems"
- Usage Note 15883, "Length limitations when submitting SAS code"
- Usage Note 39619, "Options you can use on the %INCLUDE statement such as a LRECL= specification"
One possible way to verify that this is the problem is to invoke SAS, and open the same program in the Program Editor window (select View ► Program Editor). Then, submit the SAS code and check the SAS log. The same error might occur depending on the version because the Program Editor also has a line size limitation, but this line size varies by release (see Usage Note 15883). Make sure that the code is valid by opening the same program in an Enhanced Editor window (select View ► Enhanced Editor) and run the code. The code should run without the same error in the SAS log, because the Enhanced Editor has a longer line limitation. The Enhanced Editor has a maximum line length of 960 characters or more, depending on the SAS release.
A possible workaround is to create a new SAS program that calls the original program using the %INCLUDE statement, and also use the condition LRECL=32767.
Operating System and Release Information
SAS System | Base SAS | z/OS | | |
z/OS 64-bit | | |
OpenVMS VAX | | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | | |
Microsoft Windows XP 64-bit Edition | | |
Microsoft® Windows® for x64 | | |
OS/2 | | |
Microsoft Windows 8 Enterprise 32-bit | | |
Microsoft Windows 8.1 Enterprise 32-bit | | |
Microsoft Windows 8 Pro x64 | | |
Microsoft Windows 8 Enterprise x64 | | |
Microsoft Windows 8 Pro 32-bit | | |
Windows 7 Enterprise x64 | | |
Windows 7 Enterprise 32 bit | | |
Microsoft Windows Server 2012 Std | | |
Microsoft Windows XP Professional | | |
Microsoft Windows Server 2012 R2 Std | | |
Microsoft Windows Server 2012 R2 Datacenter | | |
Microsoft Windows Server 2012 Datacenter | | |
Microsoft Windows Server 2008 for x64 | | |
Microsoft Windows Server 2008 R2 | | |
Microsoft Windows Server 2008 | | |
Microsoft Windows Server 2003 for x64 | | |
Microsoft Windows Server 2003 Standard Edition | | |
Microsoft Windows Server 2003 Enterprise Edition | | |
Microsoft Windows Server 2003 Datacenter Edition | | |
Microsoft Windows NT Workstation | | |
Microsoft Windows 2000 Server | | |
Microsoft Windows 2000 Professional | | |
Microsoft Windows 2000 Datacenter Server | | |
Microsoft Windows 95/98 | | |
Microsoft Windows 2000 Advanced Server | | |
Microsoft Windows 8.1 Pro 32-bit | | |
Microsoft Windows 8.1 Pro | | |
Microsoft Windows 8.1 Enterprise x64 | | |
Windows 7 Home Premium 32 bit | | |
Windows 7 Home Premium x64 | | |
Windows 7 Professional 32 bit | | |
Windows 7 Professional x64 | | |
Windows 7 Ultimate 32 bit | | |
Windows 7 Ultimate x64 | | |
Windows Millennium Edition (Me) | | |
Windows Vista | | |
Windows Vista for x64 | | |
64-bit Enabled AIX | | |
64-bit Enabled HP-UX | | |
64-bit Enabled Solaris | | |
ABI+ for Intel Architecture | | |
AIX | | |
HP-UX | | |
HP-UX IPF | | |
IRIX | | |
Linux | | |
Linux for x64 | | |
Linux on Itanium | | |
OpenVMS Alpha | | |
OpenVMS on HP Integrity | | |
Solaris | | |
Solaris for x64 | | |
Tru64 UNIX | | |
*
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: | Usage Note |
Priority: | medium |
Topic: | SAS Reference ==> Procedures ==> SOURCE
|
Date Modified: | 2010-05-17 13:37:20 |
Date Created: | 2001-09-27 12:09:38 |