标签:style blog color 数据 io for re c
1 DATA _NULL; /*_NULL_使得系统不需要生成一个新的数据集,以节省内存*/ 2 INFILE ‘C:\MYRAWDATA\Candy.dat‘; 3 INPUT Name $ 1-11 class @15 DateReturned MMDDYY10. Candytype $ Quantity; 4 Profit=Quantity*1.25; 5 6 /*重点:利用FILE和PUT输出报告*/ 7 FILE ‘C:\Myrawdata\student.txt‘ PRINT; /*FILE语句指定REPROT的输出路径,PRINT选项告诉SAS to include回车和分页符*/ 8 TITLE;/*零TITLE语句命令SAS消去所有默认的标题*/ 9 PUT @5 ‘Candy sales report for ‘ Name ‘from classroom‘ Class 10 //@5 ‘Congratulations! You sold‘ Quantity ‘boxes of candy 11 /@5 ‘and earned‘ profit DOLLAR6.2 ‘for our field trip‘; 12 PUT _PAGE_;/*在每个学生的报告中插入分页符*/ 13 RUN;
备注:
【SAS BASE】利用FILE语句和PUT语句输出简单报告,布布扣,bubuko.com
【SAS BASE】利用FILE语句和PUT语句输出简单报告
标签:style blog color 数据 io for re c
原文地址:http://www.cnblogs.com/chenyn68/p/3866343.html