11-14-2013 12:58 PM
how kann i find or delete if the any Variable in a table have the same value?
if the var1 have only value "test" then i dont need that Variable.
I have 1478 Variable. i can not look at every Variable wiht Prog tabulate or freq.
11-14-2013 02:36 PM
Consider this proc freq. Depending on your data this may be "too much". If you have variables that you know have more than one level you could drop them from consideration. data=sashelp.heart(drop=.......);
11-15-2013 04:50 AM
Thanks but there is no error message:
ERROR: The SAS System stopped processing this step because of insufficient memory
Do you know another way? or with macro?
Thanks a lot
11-15-2013 10:59 AM
For numeric variables, it would be possible to use PROC MEANS instead of PROC FREQ. The program could compare the MIN to the MAX for each variable, to see whether they differ. (That would not identify variables that are always either missing or some other constant value.) The difficultly with that approach is that it gets a little complex. A simpler way would be to have PROC MEANS compute the range:
proc means data=have noprint;
output out=stats (drop=_freq_ _type_) range=;
The values in the output data set should be easy to parse in a DATA step to figure out which values change. The only complication is that the DATA step would need to use an array with the VNAME function to determine the original variable name.
That approach would let you limit PROC FREQ to handling just the character variables ... possibly with enough memory to do the job.
11-15-2013 10:18 AM
I think this SAS-L thread address the subject well.
It includes participation from some real SAS programming "heavy hitters" and one not so much (me).