Use KEEP= dataset option (data statement or set statement) or KEEP
statement in a datastep. eg. Data fewdata (keep = var10 var11); Set fulldata (Keep= VAR1 VAR2 VAR3 VAR4 VAR5); Keep var6 var7; Run;
Code a PROC SORT on a data set containing State, District and County as the primary variables, along with several numeric variables.
Proc sort data= Dist_County; By state district city; Run;
use select statement with just those 5 variables:
proc sql; create table only5 as select var1,var2,var3,var4,var5 from example; quit;
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!