Problem Note 38147: Using DSD and DLMSTR= on the INFILE statement does not handle consecutive delimiters correctly
DSD and DLMSTR= options on the INFILE statement are not correctly handling consecutive delimiters.
When you use DSD and DLMSTR= on the INFILE statement, you would expect consecutive delimiters to create a missing value. Currently, this is not behaving as it should. If your variables are character, you will get a missing value but the value following will contain a portion of the delimiter. If your variables are numeric, the consecutive delimiters are ignored.
Refer to SAS note
33385 for more information on handling multiple delimiters when reading a file.
Operating System and Release Information
| SAS System | Base SAS | 64-bit Enabled HP-UX | 9.2 TS2M0 | 9.3 TS1M0 |
| 64-bit Enabled AIX | 9.2 TS2M0 | 9.3 TS1M0 |
| Windows Vista | 9.2 TS2M0 | 9.3 TS1M0 |
| Windows Vista for x64 | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows XP Professional | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2008 for x64 | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2003 for x64 | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft® Windows® for x64 | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | 9.3 TS1M0 |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | 9.3 TS1M0 |
| z/OS | 9.2 TS2M0 | 9.3 TS1M0 |
| 64-bit Enabled Solaris | 9.2 TS2M0 | 9.3 TS1M0 |
| HP-UX IPF | 9.2 TS2M0 | 9.3 TS1M0 |
| Linux | 9.2 TS2M0 | 9.3 TS1M0 |
| Linux for x64 | 9.2 TS2M0 | 9.3 TS1M0 |
| OpenVMS on HP Integrity | 9.2 TS2M0 | 9.3 TS1M0 |
| Solaris for x64 | 9.2 TS2M0 | 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.
Here is code that demonstrates the problem.
data one;
infile cards dlmstr='||' dsd;
input a $ b $ c $ ;
/* input a b c; */
cards;
123||||4
;
run;
proc print;
run;
If your variables are numeric, your output will be:
Obs a b c
1 123 . .
If your varialbes are character, your output will be:
Obs a b c
1 123 |4
If you use DSD and DLMSTR= together on the INFILE statement, you would expect consecutive delimiters to be set to missing. This is not currenlty happening.
| Type: | Problem Note |
| Priority: | medium |
| Topic: | SAS Reference ==> DATA Step Common Programming Tasks ==> Reading and Writing External Data
|
| Date Modified: | 2011-10-05 12:50:16 |
| Date Created: | 2009-12-15 10:36:03 |