Reputation: 30765
When I use the Data Step, I don't want to include temporary variables as columns. For example, in the following, while I want to include y
as a column, I don't want to include a
and b
as columns. How can I tell SAS to not include a
and b
as columns?
Data Table1;
Set Table2;
a=scan(column_x,1,'_')
b=scan(column_x,2,'_')
y=cats(a, ':', b)
Run;
Upvotes: 1
Views: 697
Reputation: 27508
Use
DROP
statementDROP A B;
(DROP=
data set optionDATA Table1(Drop=A B);
KEEP
statement(KEEP=
data set optionYou would explicitly list the desired variables when coding KEEP
.
Upvotes: 6