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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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