该程序是The littile sas book中4.8节的例题:
data _null_;
infile 'c:\users\lichao\desktop\data2\candy.dat';
input Name $ 1-11 Class @15 Date MMDDYY10. Candytype $ Quantity;
profit=Quantity*1.25;
file 'c:\users\lichao\desktop\data2\student.txt' print;
title;
put @5 'Candy sales report for 'Name ' from ' Class
// @5 'Congratulations! You sold ' Quantity ' boxes of candy'
/ @5 'and earned ' Profit Dollar6.2 ' for our field trip.';
put _page_;
run;
程序报错:
ERROR: The name Candy sales report for is not a valid SAS name.
应该就是从put开始这一行错了
疑问:put后面的Class我觉得应该为Class‘’,两个引号。一个是表示引用Class,另一个是第一句的结束
本人对put的用法不是清楚,忘大神指点,先谢过各位了!!!