Usage Note 46904: Numeric variables are not quoted in ODS CSV output created with PROC PRINT
In SAS® 9.3, there is PROC PRINT logic in the CSV tagset that checks to see whether a SAS variable is character or numeric. This logic prevents quoting from occurring if a variable contains only numbers, including numbers formatted with commas, decimals, and currency symbols. In order to quote all columns in a CSV file, do one of the following:
- Rewrite the code using a procedure such as PROC REPORT that does not perform this check.
- Use the updated CSV tagset that is available on the Downloads tab. This tagset comments out the variable 'type' check used by PROC PRINT, shown here:
do /if cmp( proc_name, "Print");
set $type type;
set $type "Number" /breakif cmp( type, "double");
done;
If a change to the tagset is preferred, SAS Note 32394 discusses strategies for storing the updated tagset.
Operating System and Release Information
SAS System | N/A | z/OS | 9.3 TS1M0 | |
Z64 | 9.3 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.3 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.3 TS1M0 | |
Microsoft® Windows® for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 TS1M0 | |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | |
Windows 7 Home Premium x64 | 9.3 TS1M0 | |
Windows 7 Professional 32 bit | 9.3 TS1M0 | |
Windows 7 Professional x64 | 9.3 TS1M0 | |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | |
Windows 7 Ultimate x64 | 9.3 TS1M0 | |
Windows Vista | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | |
64-bit Enabled HP-UX | 9.3 TS1M0 | |
64-bit Enabled Solaris | 9.3 TS1M0 | |
HP-UX IPF | 9.3 TS1M0 | |
Linux | 9.3 TS1M0 | |
Linux for x64 | 9.3 TS1M0 | |
Linux on Itanium | 9.3 TS1M0 | |
Solaris for x64 | 9.3 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.
Numeric variables are not quoted in ODS CSV output created with PROC PRINT.
Date Modified: | 2012-10-18 13:43:06 |
Date Created: | 2012-06-29 09:05:11 |