Assume that I have a SAS data step, where I subtract every observation (say, I only have variable X
) from its mean:
data tmp;
set tmp;
x = x-2;
run;
Let's say mean is not always 2
and I have another script that creates a text file with one line, which contains:
x = x-2;
Now, the question is, is there any way I can have something like:
data tmp;
set tmp;
load text_file;
run;
To do the same thing as the first data step? In other words, I want a solution that relies on using the content of the file (either as I showed in the data step or within a macro).