- DROP, KEEP Statements and Data set Options
The DROP statement specifies the names of the variables that you want to remove from the data set.
data readin1;
set readin;
drop score;
run;
The KEEP statement specifies the names of the variables that you want to retain from the data set.
data readin1;
set readin;
keep var1;
run;
DROP, KEEP Data set Options
The main difference between DROP/ KEEP statement and DROP=/ KEEP=data set option is that you can not use DROP/KEEP statement in procedures.
data readin1 (drop=score);
set readin;
run;
data readin1 (keep=var1);
set readin;
run;