希望你能提供帮助。
我尝试使用此代码在SAS中使用我的程序从大型机读取平面数据:
INFILE DG121 TRUNCOVER
Missover FIRSTOBS=2 ;
INPUT
@ 1 LAENGDE IB2.
@ 3 TOTANM IB2.
@ 5 REXHTYP IB2.
@ 7 RMODTAFD PD3.
@ 10 RANVDATO PD5.
@ 15 RKUNDENR PD6.
@ 21 RBRKODE PD2.
@ 23 RRAADGIV ÅCHAR1.
@ 24 RKUNDKAT ÅCHAR3.
@ 27 RMAXOPR PD8.2
@ 35 RLOBTIDO PD2.
@ 37 RPRODBET ÅCHAR6.
@ 43 RMEDIE ÅCHAR5.
@ 48 ROPSIG ZD3.
@ 69 BRUGER IB4.
I get the Note in my log:
NOTE: Invalid data for RMODTAFD in line 47291 7-9.
NOTE: Invalid data for RANVDATO in line 47291 10-14.
NOTE: Invalid data for RKUNDENR in line 47291 15-20.
NOTE: Invalid data for RBRKODE in line 47291 21-22.
NOTE: Invalid data for RMAXOPR in line 47291 27-34.
NOTE: Invalid data for RLOBTIDO in line 47291 35-36.
NOTE: Invalid data for ROPSIG in line 47291 48-50.
ERROR: Limit set by ERRORS= option reached. Further errors of this type will not be printed.
RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0
47291 .ü.......................................................^.......................5\.................
ZONE 0A00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0500FFFFFFFFFFFFFFFFFFFF0FEFFFFFFFFFFFFFFFFF
NUMR 0100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0F0AFFFFFFFFFFFFFFFFFFFF550FFFFFFFFFFFFFFFFF
101 .......................rrrr{.r{.rr{...........¸...èhÇ..{..}.{ 161
ZONE FFFFFFFFFFFFFFFFFFFFFF0999990990999FFF00001120900058632900429
NUMR FFFFFFFFFFFFFFFFFFFFFF99999C99C999CFFF00691462D00548862C0078C
LAENGDE=161 TOTANM=0 REXHTYP=-1 RMODTAFD=. RANVDATO=. RKUNDENR=. RBRKODE=. RRAADGIV=¤ RKUNDKAT=¤¤¤ RMAXOPR=. RLOBTIDO=.
RPRODBET=¤¤¤¤¤¤ RMEDIE=¤¤¤¤¤ ROPSIG=. BRUGER=-1 _ERROR_=1 _N_=47290
NOTE: EOV macro was not able to obtain an additional extent for library data set SYS15133.T093707.RA000.G46973.R0566335, volume
number 1. System rc = 00000B37; Reason code = 00000004.
ERROR: Write to WORK.WAB.DATA failed. File is full and may be damaged.
我的问题是。 我知道我的PD格式无法读取char。但我可以在某种程度上使sas跳过它无法读取的数据,所以我没有得到说明: 注意:第47291 48-50行中ROPSIG的数据无效
答案 0 :(得分:0)
您可以使用 ?? 输入格式修饰符来消除错误并使sas继续处理。查看SAS文档中的INPUT语句格式修饰符 - > Format Modifiers for Error Reporting。
data input_data;
infile datalines missover;
input age ?? 8.;
datalines;
12
45
32
A
54
Z
66
;;;;
run;
proc print data=input_data;run;
所以你的代码应该是:
INPUT
@ 1 LAENGDE ?? IB2.
@ 3 TOTANM ?? IB2.
@ 5 REXHTYP ?? IB2.
@ 7 RMODTAFD ?? PD3.
.
.
.
此外,我想指出,根据您的日志,显示的错误是空间输出(B37超出主机空间错误)。尝试增加创建数据集的库的分配大小以防止该错误。