A Data Science Central Community
Hi all,
I am trying to import a csv file on sas using proc import.
the file imports successfuly but wit an error due to data formart of a few variables.
how do i make my import process ignore this data format issue as am scheduling a flow process which cannot proceed because of this error.
N/B the import is still successful with the error but i need to get rid of the error for my process to continue flowing.
thanks in advance.
Tags:
Do you have characters in a mostly numeric field? If so, write out the import like so:
data a;
infile "..." dsd delimiter=',' firstobs=2;
input
id :??
var1 :??
var2 :??
;
Hey Ajay,
thank you very much.
it is working now.
regards
use the proc import "save program" function from the GUI menu to save the SAS code it generates for you and then edit the "proc import" input statement directly. add specific informats for every variable;
var1:$mmddyy10 var2: $char20.
etc.
look into adding the following "infile" options as appropriate / dsd pad missing firstobs missover scanover
then resubmit.
good luck. TV
Hey Timothy,
used Ajay's suggestion and followed your advice on formatting the variables and it worked perfectly.
many thanks.
Mark
© 2019 AnalyticBridge.com is a subsidiary and dedicated channel of Data Science Central LLC
Powered by
Badges | Report an Issue | Privacy Policy | Terms of Service
Most Popular Content on DSC
To not miss this type of content in the future, subscribe to our newsletter.
Other popular resources
Archives: 2008-2014 | 2015-2016 | 2017-2019 | Book 1 | Book 2 | More
Most popular articles