Formatting Data in SAS
Posted on Nov 17, 2009 in Computer Science
Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.
** Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives. **
Data Formatting
-
To add labels to a variable, You can use the statement
label
to add labels to a variable in SAS. And it doesn't matter whether you use the quotation marks for the label string or not. -
The
label
statement in SAS is somehow similar to theformat
procedure. The difference is thatlabel
explains the name of variables whileformat
explains the value of variables. -
To quickly remove all labels
proc datasets library=mylib nolist;
modify mydataset;
attrib _all_ label='';
quit;
- There are times in SAS when you simply want to remove all the formats from a dataset. This can be done in one line in a data step.
data unformatted;
set formatted;
format _all_;
run;