2
votes

I created some CSV files and exported them to a file folder on a SAS server. I'm using the Excel SAS add-in to make some charts. For whatever reason, the only folder I can access is "My Folder", which I can also view inside Enterprise Guide. There, I can modify it and make changes.

Unfortunately, I can't figure out the path to the folder. I want to write my text files (or maybe some datasets) to that folder so I can access them with the add-in. Side note - I tried to just export the CSV files to a network drive but wasn't allowed for security reasons I guess. It looks like I'm stuck with "My Folder" being the only option, I just can't figure out the path to make use of it.

5

5 Answers

3
votes

If your "My Folder" is equivalent to a SAS library, you can do the following:

%sysfunc(pathname(work));

That gives you the path to the work library, which is at least one location that you have write access to.

2
votes

My guess is that you are confusing two things: 1. Physical folders. (the ones you are looking for) 2. SAS Metadata. (the 'file system' you are seeing)

It has been a while i worked with the excel add-in, but if (no guarantees ;)) i recall correctly, you can only access SAS objects that were registered in the SAS server metadata.

The SAS metadata looks like a file structure, but it is virtual. Objects in the same metadata folder can actually have a totally different disk location.

The easiest way would be to register the file you want to access in the metadata. (the 'my folder' if you want to make it easiest) Of course, this requires certain administrative rights on the server.

If not possible, i'm not sure that you can access it some other way through the SAS add-in.

1
votes

For reference, the metadata path to your "My Folder" is /User Folders/&sysuserid/My Folder

0
votes

You can store the files in a folder on the server and give a reference to the folder using LIBNAME in the autoexec.sas file in your ~/home folder on the server. The when you browse libraries using the add in, you will see the reference to your folder present there.

0
votes

for the university demo edition on linux/Mac try this

INFILE '/folders/myfolders/yourfilename';

if you have set up your shared folders as described in the install howto.

See one example from "the little SAS book" loading raw data: enter image description here

You can also see the path in the status line at the bottom enter image description here

Other aproach: enter

%put all;

will list "all" macro variables in the log. There you can find:

GLOBAL USERDIR /folders/myfolders

So in the example above you could also use

INFILE "&USERDIR/yourfilename";