libname resdat "d:\resdat";
%window askit
# 6 @ 12 "Do you want to execute the DATA step?"
@ 50 getdata 3 attr=underline
# 8 @ 12 "Press ENTER to continue.";
%macro create;
data temp;
set resdat.&dat;
if year(date)=&year;
%mend create;
run;
%macro plot;
proc gplot data=temp;
title2 "&pr &year1时序图";
plot &price*date=1;
symbol1 v=star i=join r=1 c=red;
%mend plot;
run;
%macro analyzew(dat,year,pr,price,year1);
%display askit;
%if %upcase(&getdata)=yes %then %create;
%plot
%mend analyzew;
%analyzew(stk000002,2000,收盘价,clpr,2000);
run;
日志显示:
ERROR: 文件“WORK.TEMP.DATA”不存在。
WARNING: 没有解析符号引用 YEAR1时序图。
ERROR: 没有打开的数据集可用来查找变量。
ERROR: 没有打开的数据集可用来查找变量。
NOTE: 上一个语句已删除。
弄不明白哪出了问题,坐等高手。谢谢。