Subscribe to DSC Newsletter

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.

Views: 791

Replies to This Discussion

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

RSS

On Data Science Central

© 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