【SAS NOTES】proc contents&OF

proc contents data=mysas.ifthen6 position;
run;

用来查看变量顺序
【使用变量缩写】

/*OF*/
data mysas.ifthen8;
    infile 'e:\ifthen.txt' dlm='09'x firstobs=2;
    input date yymmn6. sms_gtone sms_shen sms_dong sms_all;
    sum=sum(OF sms:);
run;
proc print data=mysas.ifthen8;
run;

SAS的变量缩写功能很赞,注意的是在OF 后的变量加:
一些特殊变量缩写_ALL_   _NUMERIC_   _CHARACTER_

所以相关变量起的变量名称很重要,好的命名习惯可以节约时间。

原文地址:https://www.cnblogs.com/colipso/p/2875344.html