Usage Note 23206: I have a comma-delimited data file in which missing values are represented by a null value. Thus , whenever there's a missing value I simply have consecutive commas. I'm trying to use the DLM= option on the INFILE statement but my missing values are being skipped. What have I done wrong?
Since the DLM= option is designed to work with list input, consecutive delimiters will be skipped over automatically. However, the DSD option is available to handle data such as yours. When you use DSD the default delimiter becomes a comma and consecutive commas are seen as missing values. DSD also enables you to read delimiters as characters within quoted strings. Here is an example.
|
data testdsd;
infile cards dsd;
input x y z title :$30.;
cards;
11,22,33,"This is a test of the DSD option"
11,,33,"If this works, let me know!"
run; |
Operating System and Release Information
*
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: | Usage Note |
| Priority: | low |
| Topic: | Common Programming Tasks ==> Reading and Writing External Data SAS Reference ==> DATA Step
|
| Date Modified: | 2003-02-25 20:28:54 |
| Date Created: | 2003-02-25 14:54:23 |