How does one avoid losing the SQL-like indices (indexes, if you will) when doing a self data set (e.g. data x; set x; run;)?

Reply
N/A
Posts: 1

How does one avoid losing the SQL-like indices (indexes, if you will) when doing a self data set (e.g. data x; set x; run;)?

How does one avoid losing the SQL-like indices (indexes, if you will) when doing a self data set (e.g. data x; set x; runSmiley Wink?

Super User
Super User
Posts: 6,502

Re: How does one avoid losing the SQL-like indices (indexes, if you will) when doing a self data set (e.g. data x; set x; run;)?

You can use MODIFY rather than SET statement. But you will need to watch out for other changes that might happen.

Otherwise just use a system to generate your required settings.  Such as creating a macro variable.

%let mydata=A(index=(name));

data &mydata ;

  set sashelp.class;

run;

data &mydata;

set a;

run;

Ask a Question
Discussion stats
  • 1 reply
  • 128 views
  • 0 likes
  • 2 in conversation