BookmarkSubscribeRSS Feed
QishengXia
Calcite | Level 5

libname testscan '/home/u63677777/self-test';

proc import datafile= '/home/u63677777/self-test/That.is.good.txt'
dbms = tab
out = testscan.hwscan
replace;
getnames = yes;
run;

 

4 REPLIES 4
mkeintz
PROC Star

And what did you see on the sas log?   Please post it to help us help you.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
QishengXia
Calcite | Level 5
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
68
69 libname testscan '/home/u63677777/self-test';
NOTE: Libref TESTSCAN was successfully assigned as follows:
Engine: V9
Physical Name: /home/u63677777/self-test
70
71 proc import datafile= '/home/u63677777/self-test/That.is.good.txt'
72 dbms = tab
73 out = testscan.hwscan
74 replace;
75 getnames = yes;
76 run;
 
NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to
WORK.PARMS.PARMS.SLIST.
Unable to sample external file, no data in first 5 records.
ERROR: Import unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.03 seconds
user cpu time 0.02 seconds
system cpu time 0.02 seconds
memory 9582.56k
OS Memory 28444.00k
Timestamp 11/22/2023 06:33:39 PM
Step Count 24 Switch Count 6
Page Faults 0
Page Reclaims 4510
Page Swaps 0
Voluntary Context Switches 50
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 72
 
77
78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
88
 
User: u63677777
Messages: 1
 
 
 
 
 
 
 
 
Kurt_Bremser
Super User
This is your clue:
Unable to sample external file, no data in first 5 records.
PROC IMPORT cannot make sense of the file, inspect it with a text editor.
What does the description of the file say about its structure?
Tom
Super User Tom
Super User

So what is in the first five lines??

You can ask SAS to SHOW you.

data _null_;
  infile '/home/u63677777/self-test/That.is.good.txt' obs=5;
  input;
  list;
run;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 511 views
  • 0 likes
  • 4 in conversation