1 data mysas.ifthen10;
2     infile 'e:\ifthen.txt' firstobs=2;
3     input date yymmn6. gtone shen dong all;
4     y=year(date);
5     m=month(date);
6     format date yymmn6.;
7     file 'e:\output.txt' print;
8     put y '年' m 'm,getong sms users number is' gtone;
9 run; 

put的好处是可以直接根据变量生成文本结果报告。同时需要注意的一点是如果想输出中文需要在安装sas的时候加装中文环境。

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-14
  • 2021-07-29
  • 2021-09-17
  • 2021-10-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
相关资源
相似解决方案