In SAS, what does the option "dsd" stand for?

sas
tumultous_rooster picture tumultous_rooster · Dec 30, 2013 · Viewed 28.4k times · Source

I have a quick question.

I am learning SAS and have come across the dsd= option.

Does anyone know what this stands for? It might assist in remembering / contextualizing.

Thanks.

Answer

Yick Leung picture Yick Leung · Dec 30, 2013

Rather than just copy and pasting text from the internet. I'll try to explain it a bit clearer. Like the delimiter DLM=, DSD is an option that you can use in the infile statement.

Suppose a delimiter has been specified with DLM= and we used DSD. If SAS sees two delimiters that are side by side or with only blank space(s) between them, then it would recognize this as a missing value.

For example, if text file dog.txt contains the row:

171,255,,dog 

Then,

data test;
    infile 'C:\sasdata\dog.txt' DLM=',' DSD;
    input A B C D $;
run;

will output:

                               A      B     C     D

                              171    255    .    dog

Therefore, variable C will be missing denoted by the .. If we had not used DSD, it would return as invalid data.