06-04-2016 05:39 PM
Hi, I'm receiving ERROR: Import unsuccessful. See SAS Log for details. Log Notes say invalid data for [2 of the variables]... However, it appears to be outputting all of the records to the working data set OK.
I'm using the following code to import a delimited file - Anyone have suggestions?
Appreciate it, Andy
PROC IMPORT DATAFILE="/folders/myfolders/PropertyData_R.txt"
06-04-2016 05:49 PM
Post your log. In general I recommend using a datastep to import rather than Proc Import.
Proc Import will post the data step code to the log. Copy that code and check the variable type/length for the variable SAS indicates it has issues with.
06-05-2016 01:01 AM
One cause for this is that one of the data fields has a | imbedded that is not intended as a delimiter, such as a user might enter in a list like: chicken|steak or 1|3. Which can sometimes throw off the column counts.
Or a variable type is set to numeric because the first few rows make a column look like it should be numeric but further columns contain text.
Try adding the statement
GUESSINGROWS = 32767;
08-07-2016 06:51 PM
Hi, thank you very much. I did add GUESSINGROWS = 32767; and it worked!
Prior to implementing this fix, the log error essentially said "Proc Import failed see log for details...." No further details were provided in the log.
GUESSINGROWS = 32767 resolved this error. Prior the error was truncating an address field that shouldn't have been truncated, thereby cutting off the end of the character field i.e., "suite number" before it imported into SAS Studio. Adding this GUESSINGROWS corrected this issue.
Not sure exactly how it works but it solved my problem.
Once again thank you!