BookmarkSubscribeRSS Feed
beathe
Calcite | Level 5
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...............
3 REPLIES 3
Doc_Duke
Rhodochrosite | Level 12
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.
beathe
Calcite | Level 5
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 ÐÏࡱá
Ksharp
Super User
try to use:

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




Ksharp

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1264 views
  • 0 likes
  • 3 in conversation