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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 3649 views
  • 5 likes
  • 3 in conversation