LZ,偶运行了一下你的代码,看错误提示,不知你的LOG里为何没有?
NOTE: SAS initialization used:
real time 6.75 seconds
cpu time 0.42 seconds
1 data statepop;
2
3 input State $ citypop_80 citypop_90
4
5 Noncitypop_80 Noncitypop_90 Region @@;
6
7
8
9 statepop;
--------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
10 input State $ citypop_80 citypop_90
11
12 Noncitypop_80 Noncitypop_90 Region @@;
13
14
15 input State $ citypop_80 citypop_90
16 Noncitypop_80 Noncitypop_90 Region @@;
17
18 datalines;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.STATEPOP may be incomplete. When this step was stopped there were 0
observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.04 seconds
24 ;
25
26
27 datalines;
---------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
28 ME .405 .443 .721 .785 1 NH .535 .659 .386 .450 1
--
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
29
30 NY 16.144 16.515 1.414 1.475 1 NJ 7.365 7.730 .k .A 1
31
32 ;
33
34 proc print data=statepop;
35
36 print data=statepop;
37 run;
NOTE: No observations in data set WORK.STATEPOP.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.07 seconds
cpu time 0.00 seconds
38
39 ;
偶把你的程序 改了一下:
data statepop;
input State $ citypop_80 citypop_90
Noncitypop_80 Noncitypop_90 Region @@;
cards;
ME .405 .443 .721 .785 1 NH .535 .659 .386 .450 1
NY 16.144 16.515 1.414 1.475 1 NJ 7.365 7.730 .k .A 1
;
proc print data=statepop;
run;
下去是运行的 Log,注意,一切OK!
84 data statepop;
85
86 input State $ citypop_80 citypop_90
87
88 Noncitypop_80 Noncitypop_90 Region @@;
89
90 cards;
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.STATEPOP has 4 observations and 6 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
95 ;
96 proc print data=statepop;
97 run;
NOTE: There were 4 observations read from the data set WORK.STATEPOP.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
下面是运行的结果:
The SAS System 08:31 Wednesday, June 9, 2009 3
citypop_ citypop_ Noncitypop_ Noncitypop_
Obs State 80 90 80 90 Region
1 ME 0.405 0.443 0.721 0.785 1
2 NH 0.535 0.659 0.386 0.450 1
3 NY 16.144 16.515 1.414 1.475 1
4 NJ 7.365 7.730 K A 1