Problem Note 15639: Character value of period is not output when DSD specified on FILE
statement
A character value of period is treated as a missing value instead of a
period when DSD is specified on the FILE statement. The sample below
illustrates this incorrect behavior.
data test;
input x $char1. +1 y $char1. +1 z $char1.;
datalines;
a . c
. . .
;
data _null_;
set test;
file print dlm=',' dsd;
put x y z;
run;
/* OUTPUT */
a,,c
,,
Removing the DSD option from the FILE statement above generates the
expected results.
/* OUTPUT */
a,.,c
.,.,.
If the DSD option is necessary, a possible workaround is to use the
$QUOTEw. format. The period is displayed, however it is written
surrounded by quotes. In the sample below, only Y has been formatted
with $QUOTEw.
data _null_;
set test;
file print dlm=',' dsd;
put x y $quote.',' z;
run;
/* OUTPUT */
a,".",c
,".",
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows NT Workstation | 8 TS M1 | |
| Microsoft Windows 95/98 | 8 TS M1 | |
| Microsoft Windows 2000 Datacenter Server | 8 TS M1 | 9.2 TS1M0 |
| Microsoft Windows 2000 Server | 8 TS M1 | 9.2 TS1M0 |
| Microsoft Windows 2000 Professional | 8 TS M1 | 9.2 TS1M0 |
| OpenVMS VAX | 8 TS M1 | |
| Microsoft Windows 2000 Advanced Server | 8 TS M1 | 9.2 TS1M0 |
| Solaris | 8 TS M1 | |
| OS/2 | 8 TS M1 | |
| IRIX | 8 TS M1 | |
| 64-bit Enabled Solaris | 8 TS M1 | 9.2 TS1M0 |
| HP-UX | 8 TS M1 | |
| ABI+ for Intel Architecture | 8 TS M1 | |
| z/OS | 8 TS M1 | 9.2 TS1M0 |
| 64-bit Enabled HP-UX | 8 TS M1 | 9.2 TS1M0 |
| CMS | 8 TS M1 | |
| 64-bit Enabled AIX | 8 TS M1 | 9.2 TS1M0 |
| OpenVMS Alpha | 8 TS M1 | 9.2 TS1M0 |
| Tru64 UNIX | 8 TS M1 | |
| AIX | 8 TS M1 | |
*
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: | Common Programming Tasks ==> Reading and Writing External Data ==> EFI Common Programming Tasks ==> Reading and Writing External Data ==> Export Wizard Common Programming Tasks ==> Reading and Writing External Data ==> File Options Common Programming Tasks ==> Reading and Writing External Data ==> with PROC EXPORT
|
| Date Modified: | 2009-07-15 14:14:34 |
| Date Created: | 2005-06-23 08:44:36 |