例:基于列的变量操作与运算
* Modify homegarden data set with assignment
statements;
DATA garden;
INFILE 'C:\...\Garden0.dat';
INPUT Name $ 1-7 Tomato Zucchini Peas Grapes;
Zone = 14;
Type = 'home';
Zucchini = Zucchini * 10;
Total = Tomato + Zucchini + Peas + Grapes;
PerTom = (Tomato / Total) * 100;
RUN;
DATA garden1;
SET garden;
KEEP Name Total;
RUN;
DATA garden2;
SET garden;
DROP Zone Type;
RUN;