Answering the second part of the question, what it's doing is:
There is a variable i
which has some value indicating a row that the user wants to retrieve values from. When that row is reached, the values in three variables are stored in macro variables that have the row number in their name, such as if i=5, then it will take the 5th row, and put the three variables in &var005
, &min005
, &max005
.
However, there are a number of issues with this code. First off, reusing i
in that loop is a bad idea; while it doesn't do anything permanent, it easily could with minor changes that could arise from other features/bugfixes.
Second, the loop as currently structured is pointless. It's not doing anything based on i
, so it's just putting the same 3 values into the same 3 macro variables multiple times. It looks to me like this is someone's take on code they copied from the internet, but slightly misunderstood.
Probably what it should do, is something like this:
data _null_;
set &dset_in.;
call symput ("var" !! strip(put(_n_, 3.)), strip(Variabile));
call symput ("min" !! strip(put(_n_, 3.)), strip(lim_inf));
call symput ("max" !! strip(put(_n_, 3.)), strip(lim_sup));
run;
That would make macro variables for each row with the row number in the name, using the automatic data step loop. This is just a guess, though, not knowing anything about the program beyond what I see here.
But that's all with the caveat that this whole operation is a bad idea; storing data values in macro variables is poor programming practice. Don't do it.