SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 15883: Length limitations when submitting SAS® code

DetailsAboutRate It

There are many ways to submit SAS® code and the length limitation is different depending on how you submit your code. The following are the length limitations as imposed by the various submission methods prior to SAS® 9.2 and for SAS 9.2 and beyond:

  • Submitting a SAS program via a batch file imposes a maximum length limit of 256 characters prior to SAS 9.2. For SAS 9.2 and beyond you can use the new SAS system option of LRECL= to specify a range of 1-32767 to use for reading and writing external files. The default for the LRECL= system option is 256. This option is valid in the configuration file, at SAS invocation, the OPTIONS statement, or the SAS Systems Option window. Under z/OS, the LRECL= system option is recognized only for reading and writing HFS files.
  • Submitting a SAS program from the Program Editor imposes a maximum length limit of 384 characters prior to SAS 9.2. For SAS 9.2 and beyond you can use the new SAS system option of DMSPGMLINESIZE= to specify a range of 136-960 to specify the maximum number of characters in a Program Editor line. The default for the DMSPGMLINESIZE= system option is 136. This option is valid in the configuration file or at SAS invocation.
  • Submitting a SAS program from the Enhanced Editor imposes a maximum length limit of 960 characters prior to SAS 9.2. For SAS 9.2 and beyond the maximum length is extended to 6,000 characters.
  • Submitting SAS code using the IOM submit via the metadata server or a stored process server imposes a maximum length limit of 2,000 characters prior to SAS 9.1. For SAS 9.1 the maximum length limit extends to 6,000 characters. For SAS 9.2 and beyond, the maximum length limit extends to 32,767 characters.
  • Submitting SAS code using a %INCLUDE statement imposes a maximum length limit of 2,000 characters prior to SAS 9.1. For SAS 9.1 and beyond the maximum length limit is 6,000 characters. For further information about %INCLUDE, 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 39619, "Options you can use on the %INCLUDE statement such as a LRECL= specification"

For specific details under your operating system, see the SAS Companion documentation for your operating environment.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASMicrosoft Windows 8 Enterprise x64
Microsoft Windows XP 64-bit Edition
Microsoft® Windows® for x64
OS/2
Microsoft Windows 8 Enterprise 32-bit
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 8 Pro 32-bit
Microsoft Windows 8 Pro x64
Microsoft Windows 8.1 Enterprise 32-bit
Microsoft Windows 8.1 Enterprise x64
Microsoft Windows 8.1 Pro
Microsoft Windows 8.1 Pro 32-bit
Microsoft Windows 95/98
Microsoft Windows 2000 Advanced Server
Microsoft Windows 2000 Datacenter Server
Microsoft Windows 2000 Server
Microsoft Windows 2000 Professional
Microsoft Windows NT Workstation
Microsoft Windows Server 2003 Datacenter Edition
Microsoft Windows Server 2003 Enterprise Edition
Microsoft Windows Server 2003 Standard Edition
Microsoft Windows Server 2003 for x64
Microsoft Windows Server 2008
Microsoft Windows Server 2008 R2
Microsoft Windows Server 2008 for x64
Microsoft Windows Server 2012 Datacenter
Microsoft Windows Server 2012 R2 Datacenter
Microsoft Windows Server 2012 R2 Std
Microsoft Windows Server 2012 Std
Microsoft Windows XP Professional
Windows 7 Enterprise 32 bit
Windows 7 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.