Search notes:

SAS datasets: in place editing

If the dataset that is specified with the set statement is equal to the data set being produced, the data can be edited in place.
In such a case, SAS will create a temporary dataset, add each (modified) record to the temporary data set as it reads them from the original one, deletes the original data set and renames the temporary data set to the name of the original one.
If the underlying data set is stored in an RDBMS, this causes a problem: because a new table is created, all grants and privileges on the original tables will be lost.
Therefore, an modify statement is more suited for in place editing.
data tq84_dat;
  do n = 1 to 10;
     m = n*2;
     output;
  end;
run;

data tq84_dat;
   set tq84_dat; /* In place editing */
   n = n*3;
run;

proc sql;
  select * from tq84_dat;
quit;
Github repository about-SAS, path: /programming/data-sets/in-place-editing.sas

See also

data set

Index