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

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