Problem Note 56608: The NLPCTw.d format writes garbage characters in front of missing values in the output
If you apply the NLPCTw.d format to a variable that contains missing values, garbage characters might be displayed in front of the missing values. This behavior occurs when you apply the format in PRINT and SQL procedures.
To circumvent the problem, assign the NLPCTw.d format in a DATA step.
Click the Full Code tab to see sample code that illustrates the problem and the circumvention.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.3 TS1M0 | 9.4 TS1M0 |
Z64 | 9.3 TS1M0 | 9.4 TS1M0 |
Microsoft® Windows® for x64 | 9.3 TS1M0 | 9.4 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 R2 | 9.3 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | 9.4 TS1M0 |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 TS1M0 | 9.4 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 | 9.4 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 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.3 TS1M0 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.3 TS1M0 | 9.4 TS1M0 |
HP-UX IPF | 9.3 TS1M0 | 9.4 TS1M0 |
Linux | 9.3 TS1M0 | 9.4 TS1M0 |
Linux for x64 | 9.3 TS1M0 | 9.4 TS1M0 |
Solaris for x64 | 9.3 TS1M0 | 9.4 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.
Garbage characters are not displayed in front of missing values when you assign the NLPCT
w.d format with the DATA step. It does occur when you assign the format with PROC SQL and PROC PRINT.
/* Create a sample data set */
data a;
input x;
datalines;
.
.4
.0001
;
run;
/* Formatting with PROC SQL demonstrates the problem */
proc sql;
select x format nlpct20.2
from a;
quit;
/* Formatting with PROC PRINT demonstrates the problem */
proc print data=a;
format x nlpct20.2;
run;
/* Applying the format inside the DATA step is a circumvention */
data a;
input x;
format x nlpct20.2;
datalines;
.
.4
.0001
;
run;
Results of PROC SQL
x
ð .
40.00%
0.01%
Results of PROC PRINT
Obs x
1 1 .
2 40.00%
3 0.01%
/* Data set in Viewtable view when DATA step applies the format */
Obs x
1 .
2 40.00%
3 0.01%
Type: | Problem Note |
Priority: | high |
Topic: | SAS Reference ==> Formats ==> Numeric ==> NLPCT
|
Date Modified: | 2015-09-18 16:37:27 |
Date Created: | 2015-09-17 11:20:07 |