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

Hi,

 

I am trying to learn sas programming.

 

I wrote the below code on University edition of SAS

 

libname Staging '/folders/myfolders/';

PROC IMPORT DATAFILE='/folders/myfolders/temp2/LoadSomeRandomFile.XLSX'
OUT = Staging.RandomTable
DBMS = xlsx;
sheet='Sheet1';
run;

After execution of this code, a lib "Staging" was created. All fine till now

 

Now, i executed the below code

 

libname Cleaning '/folders/myfolders/';

Which created another library name Cleaning, but....... why there is "RandomTable" table in cleaning tooo..... when i had not specified to create it. Why does sas creates it by default.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20

a library reference is a logical way of merely pointing a folder where your datasets are stored

 

in your examples, you have used two different library references namely staging and cleaning that points to the same folder

 

Therefore, when you saved your dataset random table in that very folder using alibrary reference and then point the same folder with  another library reference, you are still basically pointing the same physical area or location where the datasets are stored

 

Hope that helps

View solution in original post

1 REPLY 1
novinosrin
Tourmaline | Level 20

a library reference is a logical way of merely pointing a folder where your datasets are stored

 

in your examples, you have used two different library references namely staging and cleaning that points to the same folder

 

Therefore, when you saved your dataset random table in that very folder using alibrary reference and then point the same folder with  another library reference, you are still basically pointing the same physical area or location where the datasets are stored

 

Hope that helps

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 1 reply
  • 885 views
  • 0 likes
  • 2 in conversation