BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Yusuf10
Fluorite | Level 6

I keep getting this error in my Log 

ERROR: Output SAS data set must be provided. 

 

Here is my code and the file is attached below

Proc import datafile="C:\Users\yusco\OneDrive\Desktop\STAT 5200 HW9 Data Files\JobPrefix.csv";
   dbms=csv
   out = HW9.JobPrefix replace;
   guessingrows= 100;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Do you have a LIBNAME statement that creates the HW9 library? It's not in your code?

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

You don't want to have a semi-colon at the far right of line 1.

--
Paige Miller
Yusuf10
Fluorite | Level 6

This is what i got after i removed the semi colon

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
57
58 Proc import datafile="C:\\Users\\yusco\\OneDrive\\Desktop\\STAT 5200 HW9 Data
58 ! Files\\jobAcct.csv"
59 dbms=csv
60 out = HW9.JobAcct replace;
61 getnames=yes;
62 run;
 
ERROR: Library name is not assigned.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
63
64 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
Reeza
Super User
Do you have a LIBNAME statement that creates the HW9 library? It's not in your code?
Yusuf10
Fluorite | Level 6

Thank you so much, the problem was really my libname. I found a way to go about it and this is the code that works fine for me now. 

libname HW9 "C:\Users\yusco\OneDrive\Desktop\STAT5200\HW9";
filename jobAcct "C:/Users/yusco/OneDrive/Desktop/STAT 5200 HW9 Data Files\jobAcct.csv";
Proc import datafile= jobAcct
   dbms=csv
   out = HW9.JobAcct replace;
   getnames=yes;
run;

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3331 views
  • 5 likes
  • 3 in conversation