I keep getting this error code over and over, with different line numbers of course.
NOTE: Invalid data for VAR4 in line 264808 30-30.
RULE:----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+
264808 F113Q1008712|201506|43003.27|R|28|332|N||||3.375|0|201412|||| 61
VAR1=F113Q1008712 VAR2=201506 VAR3=43003.27 VAR4=. VAR5=28 VAR6=332 VAR7=N VAR8= VAR9=
VAR10= VAR11=3.375 VAR12=0 VAR13=2 VAR14= VAR15= VAR16= VAR17= _ERROR_=1 _N_=264808
After enough time I this happening I get this error code:
WARNING: Limit set by ERRORS= option reached Further errors of this type will not be printed.
I'm assuming it is a problem with the delimiter (pipe '|' in my case). I found another question that said:
"If it's actually tab delimited, you may need to use dlm='09'x
instead." I guess my problem is my lack of understanding of coding. (I'm just using SAS to supplement my thesis, so a lot of this is learning as I'm going.) Where would I put dlm='09'x
at and would it even help me in my case.
I also found a comment on another question that said:
"The $ makes it a character variable, not a numeric variable. That will almost certainly override any informat errors (since character variables are very flexible) but won't give you necessarily the right results.:)"
After reading those answers I believe I need to somehow tell SAS to accept the numerical value that can appear in Var4 and also the variable value of 'R'. Is there a way to make SAS accept either. Or am I just going to have to change all of my 'R' to a numerical value?
If it helps I'm inputting into SAS using this code:
proc import datafile="E:\2013\historical_data1_time_Q12013.txt"
out=TYr2013Q1
dbms=dlm
replace;
delimiter='|';
getnames=no;
run;
Thanks for any help. It's much appreciated.