data have;
do i=1 to 200;
myvar+i*i;
output;
end;
run;
data want;
set have(obs=100);
set have(firstobs=2 keep=myvar rename=(myvar=myvarPlusOne));
y=myvarPlusOne-myvar;
run;
data have;
do i=1 to 200;
myvar+i*i;
output;
end;
run;
data want;
set have(obs=100);
set have(firstobs=2 keep=myvar rename=(myvar=myvarPlusOne));
y=myvarPlusOne-myvar;
run;
data have;
set sashelp.heart;
run;
%let col=4;
%let row=6;
data _null_;
set sashelp.vcolumn(where=(libname='WORK' and memname='HAVE' and varnum=&col.));
call execute(cat('data want;set have;if _n_= ',&row.,';keep ',name,';run;'));
run;
Special offer for SAS Communities members
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.