Some examples of why this is not considered good practice. Say you're working interactively, and you have the following code dataset named tmp
:
data tmp;
set sashelp.class;
run;
If you were to run the below code twice, it would run fine the first time, but on the second run you would receive a warning as the variable age no longer exists on that dataset:
data tmp;
set tmp;
drop age;
run;
In this case, it's a pretty harmless example, and you are lucky enough that SAS is simply giving a warning. Depending on what the data step was doing though, it could just just as easily have been something that generates an error, e.g.:
data tmp;
set tmp (rename=(age=blah));
run;
Or even worse, it may generate no ERROR or WARNING, and change the expected results like the below code:
data tmp;
set tmp;
weight = log(weight);
run;
Our intention is to apply a simple log transformation to the weight variable in preparation for modeling, but if we accidentally run the step a second time, we are calculating the log(log(weight)). No warnings or errors will be given and looking at the dataset it will not be immediately obvious that anything is wrong.
IMO, you are much better off creating iterative datasets, ie. tmp1, tmp2, tmp3, and so on... for every process that updates the dataset in some way. Space is much cheaper than spending time debugging.