bobguy 发表于 2012-10-16 09:46
The option dlmstr will do the job. The option truncover = missover + pad;
Here is the log.
我复制了你的代码运行,还是不对
165 data a;
166 infile cards dlmstr='^@^' dsd truncover;
167 input x y z;
168 put @12 x y z/;
169 list;
170 cards;
1 2 3
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
171 1^@^2^@^3
NOTE: 在第 172 行、第 2-4 列中有对“y”无效的数据。
. . 6
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
172 ^@^5^@^6
x=. y=. z=6 _ERROR_=1 _N_=2
NOTE: 在第 173 行、第 6-8 列中有对“z”无效的数据。
7 . .
173 7^@^^@^9
x=7 y=. z=. _ERROR_=1 _N_=3
10 11 .
174 10^@^11^@^
NOTE: 数据集 WORK.A 有 4 个观测和 3 个变量。
NOTE: “DATA 语句”所用时间(总处理时间):
实际时间 0.05 秒
CPU 时间 0.04 秒
175 ;
176 run;
数据表中的5和8还是缺失,是不是因为sas版本的问题,我用的是9.2,还是谢谢你