I need to import a 2GB big csv to SAS. There are some variables which are formatted in Excel as general, thus, numbers have thousands seperators (e.g. 1,234.56). When importing to SAS, the error is:
NOTE: Invalid data for Settlement_Price in line 111 26-30.
And the field is empty. I cannot change the format in Excel because the file is too big. How can I import the raw number? Best12. or 12. does not work.
I tried importing with 12. or best 12.
%let _EFIERR_ = 0; /* set the ERROR detection macro variable */
infile 'C:\OP\EoD.csv' delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=2 ;
informat RIC $12. ;
informat Settlement_Price best32. ;
informat Open_Interest best32. ;
informat Trade_Date ddmmyy10. ;
informat Volume best32. ;
format RIC $12. ;
format Settlement_Price best12. ;
format Open_Interest best12. ;
format Trade_Date ddmmyy10. ;
format Volume best12. ;
input
RIC $
Settlement_Price
Open_Interest
Trade_Date
Volume
;
if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */
run;```