BookmarkSubscribeRSS Feed
danwarags
Obsidian | Level 7

How do I assign a folder called myfiles to the permanent library sasuser. 

 

The folder myfiles is on my desktop and it contains datasets. I want the folder to be assigned in the permanent library sasuser. So everytime I open SAS, I see myfiles folder in the SASUSER library. 

 

I tried one way of doing it. But, I want the effiecient way of assigning the folder to SASUSER library. 

 

I did like this:

 

libname x "path";

 

data sasuser.dataset1;

set x.dataset1;

run;

 

I tried doing the below statement but did not work;

 

libname sasuser.myfiles 'path';

 

 

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

SASUSER is a libname created by the SAS system to point to its metadata files, you do Not want to change that as it will break your whole system.  If you want to have user created libnames at the start of each session then you put them in the startup files - for Base SAS this is the autoexec.sas, which is the file that is loaded upon creating a new session and any code in there will be executed before you get the interactive window.

Haikuo
Onyx | Level 15

Echo with @RW9. You don't want to mess around those SAS factory folders. If you absoultely 'have to' to do it, depending on your SAS deployment and your access permission, try following at your own risk:

1. Locate your SAS config file, for local deployment, you may find it some where like:

C:\Program Files\SASHome2\x86\SASFoundation\9.4\nls\en\sasv9.cfg

2. Open it with a text editor (e.g. notepad), find the following line (it could be completely different depending on your deployment)

 -SASUSER "?FOLDERID_Documents\My SAS Files\9.4"

3. Modify it to (not in literal):

-SASUSER "your myfiles path"

4. Save it and restart your SAS.

 

Haikuo

Oh, forgot mention: you need to save an orignal copy somewhere before you modify it, just in case.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 3 replies
  • 1164 views
  • 1 like
  • 4 in conversation