我正在尝试从数据集中给出的范围值中获取字符信息。
数据集:等级
Start End Label Fmtname Type
0 20 A $grad I
21 40 B $grad I
41 60 C $grad I
61 80 D $grad I
81 100 E $grad I
这是我为创建信息而编写的代码
proc format cntlin = grade;
run;
现在是使用新信息创建临时数据集的代码
data temp;
input grade : $grad. @@ ;
datalines;
21 30 0 45 10
;
我想要的输出是带有值的数据集 Temp :
Grade
A
B
A
..
而数据集 Temp 具有值:
Grade
21
30
0
...
SAS 日志条目:
1146 proc format cntlin = grade;
NOTE: Informat $GRAD has been output.
1147 run;
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
NOTE: There were 5 observations read from the data set WORK.GRADE.
1148
1149
1150 data temp;
1151 input grade : $grad. @@ ;
1152
1153 datalines;
NOTE: SAS went to a new line when INPUT statement reached past the end of a
line.
NOTE: The data set WORK.TEMP has 5 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
我无法理解为什么信息不起作用。谁能解释我在哪里犯了错误。