Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

sas

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.

like image 985
tumultous_rooster Avatar asked Dec 30 '13 03:12

tumultous_rooster


People also ask

What is DSD and DLM in SAS?

When you specify DSD , SAS treats two consecutive delimiters as a missing value and removes quotation marks from character values. Whereas the default functionality of DLM=',' is to treat consecutive commas as a single comma, DSD will assign missing values between consecutive commas.

What is DSD Missover in SAS?

The DSD option controls how SAS treats (or when used on FILE statement creates) multiple adjacent delimiters. The MISSOVER option controls what happens when you try to read past the end of the current line of text.

What does DLM mean in SAS?

DLM= The dlm= option can be used to specify the delimiter that separates the variables in your raw data file. For example, dlm=','indicates a comma is the delimiter (e.g., a comma separated file, . csv file). Or, dlm='09'x indicates that tabs are used to separate your variables (e.g., a tab separated file).

What is Eov SAS?

EOV=variable. specifies a variable, whose name you supply, that SAS sets to 1 when the first record in a data set in a series of concatenated data sets is read. The variable is set only after SAS encounters the next data set.


1 Answers

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.

like image 91
Yick Leung Avatar answered Oct 13 '22 19:10

Yick Leung