Hello,
In proc report, by default, temporary variable created in a compute block will be retained. Is there a way to prevent this temporary variable from retaining?
e.g.
data check;
count1 = 5;
do count2 = 1 to 10;
output;
end;
run;
proc report data=check nowd;
column count1 count2;
define count1 /order order=internal;
define count2 /order order=internal;
compute before count1;
newvar = 1; *Can we prevent 'newvar' from retaining??;
endcomp;
compute before count2;
if newvar=1 then do; text='Test'; vlen=50; end; *I want to print this line only for the first obs;
else do; text=''; vlen=0;end;
line text $varying. vlen;
endcomp;
run;