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

Hello,

I don't know why the data I imported keep going to the "work" library while I have specified where it should go ( "RBI", library.)  I have to copy and paste it to the desired library. Not sure what I am doing wrong.

 

here is the code

 

/*Importing NBI Data for ILLINOIS into SAS*/
libname RBI 'C:\Users\bmrg2\Box Sync\Mizzou 2019\Research\SAS Code\Blandine 1092020';
/*Importing TXT FILE for ILLINOIS in SAS*/
proc import datafile="C:\Users\bmrg2\Box Sync\Mizzou 2019\Research\RBI Project\Task 8_Back-casting\NBI Data from Fhwa site\IL 2019\IL19.txt"
out=NewIL19
DBMS=dlm;
delimiter=",";
Getnames=Yes;
guessingrows=1000000;
run;

 

Blandine_0-1602270279091.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
mkeintz
PROC Star

Change 

out=NewIL19

to

out=rbi.NewIL19

Otherwise SAS has no way of knowing where you want the data to go.  After all, you might have named a dozen libraries prior to the proc import, and SAS would not have a way to know your intention.

--------------------------
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

--------------------------

View solution in original post

2 REPLIES 2
mkeintz
PROC Star

Change 

out=NewIL19

to

out=rbi.NewIL19

Otherwise SAS has no way of knowing where you want the data to go.  After all, you might have named a dozen libraries prior to the proc import, and SAS would not have a way to know your intention.

--------------------------
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

--------------------------
Blandine
Obsidian | Level 7

Thanks a lot

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 569 views
  • 3 likes
  • 2 in conversation