06-23-2016 07:55 PM
What's the easiest way to remove empty columns/variables from a data set? As in when I get a subset of data from my main dataset, if there are columns which are empty/null in that subset, how do I write a program to remove such variables from the subset?
06-23-2016 09:32 PM
data class; set sashelp.class; call missing(name,age); run; ods select none; ods output nlevels=temp; proc freq data=class nlevels; tables _all_; run; ods select all; proc sql noprint; select tablevar into : drop separated by ' ' from temp where NNonMissLevels=0; quit; data want; set class(drop=&drop); run;
06-27-2016 09:58 PM
It's like this, these variables have values for certain years. But are empty for some years. So when I want to extract a dataset for a particular year from the main dataset, I want in that dataset all the null columns not to appear. Could you advice me how to do this?
06-28-2016 02:14 AM