Desktop productivity for business analysts and programmers

Error when Iimport a csv file in WindosXP environment

Reply
New Contributor
Posts: 2

Error when Iimport a csv file in WindosXP environment

I am running this sas code in EG 4.2:

------------------------------
proc import
dbms = csv
datafile = '\\wkhqpmin01\Marketing\UserSpace\BHE\Test\test_supression_snaplink.csv'
out = work.test_supression_snaplink ;
run;
-------------------------

I do not understand why my sas log shows:
Unable to sample external file, no data in first 5 records.
ERROR: Import unsuccessful. See SAS Log for details.

I have more than 40k records,with A - I columns, in my csv file. This is so weird...............
Valued Guide
Posts: 2,111

Re: Error when Iimport a csv file in WindosXP environment

Did you write this code or was it from one of the wizards? If code, try with base SAS.

I searched for the first phrase of the error message and got several possible hits on support.sas.com, particularly this one

http://support.sas.com/kb/19/720.html

You would need to look at the rest of the log for some of the parts.
New Contributor
Posts: 2

Re: Error when import a csv file in WindosXP environment

I wrote this code;

I also tried to wrote this sas code:


---------------------------------------------
DATA sasuser.test_supression_snaplink;

INFILE
'\\wkhqpmin01\Marketing\UserSpace\BHE\Test\test_supression_snaplink.csv'
DLM='9F'x
MISSOVER
DSD IGNOREDOSEOF;

FORMAT
first_name $25.
middle_initial $5.
last_name $48.
address $130.
city $24.
state $2.
zip $27.
ad_code $8.
suppression_type $5. ;
INPUT
first_name $
middle_initial $
last_name $
address $
city $
state $
zip $
ad_code $
suppression_type $ ;
run;

-----------

I got a sas dataset from this piece of code, but my csv data dos not show in the sas dataset result.I could only see some unrecongnizable stuffs: like ÐÏࡱá
Grand Advisor
Posts: 9,578

Re: Error when import a csv file in WindosXP environment

try to use:

infile ............ firstobs=6;




Ksharp
Ask a Question
Discussion stats
  • 3 replies
  • 329 views
  • 0 likes
  • 3 in conversation