各位大侠 :
我是菜鸟菜菜鸟,刚开始学SAS。
从人大经济论坛down了SAS9.1
但是遇到一个问题,请各位大侠帮助!
有别人写的程序如下,运行良好:
PROC IMPORT OUT= FinancialSummary
DATAFILE= "C:\PhDText_Examples\A1\FinancialSummary94_04.xls"
DBMS=EXCEL2000 REPLACE;
GETNAMES=YES;
SHEET="FinancialSummary94_04";
RUN;
PROC Print data=FinancialSummary; run;
proc sort data=FinancialSummary out=temp; by descending roe; run;
proc print data=temp; run;
proc univariate data=FinancialSummary; var roe roa; run;
我基本就是抄袭了,写了程序如下,但是不能运行
proc import out=work.xing
datafile="c:\xmq\460.xls"
dbms=excel 2000 replace;
getnames=yes;
run;
proc print data=work.xing;run;
proc sort data=work.xing out=temp;by descending roe;run;
proc print data=temp;run;
proc univarial data=temp;var roe roa;run;
运行日志如下:
1 proc import out=work.xing
2 datafile="c:\xmq\460.xls"
3 dbms=excel 2000 replace;
---- -------
22 202
ERROR 22-322: Syntax error, expecting one of the following: ;, DATAFILE, DATATABLE, DBMS, FILE, OUT,
REPLACE, TABLE.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
4 getnames=yes;
5 run;
6 proc print data=work.xing;run;
ERROR: File WORK.XING.DATA does not exist.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
7 proc sort data=work.xing out=temp;by descending roe;run;
ERROR: File WORK.XING.DATA does not exist.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEMP may be incomplete. When this step was stopped there were 0
observations and 0 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
8 proc print data=temp;run;
NOTE: No variables in data set WORK.TEMP.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
9 proc univarial data=temp;var roe roa;run;
ERROR: Procedure UNIVARIAL not found.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE UNIVARIAL used (Total process time):
real time 0.03 seconds
cpu time 0.00 seconds
实在不解,肯请高手指点一二!
不胜感激!