I'm trying to assign a library at startup, so added the following to the autoexec file:
%let path=/folders/myfolders/;
libname orion "/folders/myfolders/";
run;
However the autoexec doesnt seem to run upon startup in SAS studio University Edition, are there any startup logs I can look at?
After startup, if I go to Edit autoexec file and select run, then the library is assigned.
Note: I'm a newbee so it's probably something stupid.
I'm using SAS UE.
Change your code to:
%let path=/folders/shortcuts/myfolders/;
libname orion "/folders/shortcuts/myfolders/";
@Shmuel Thats only necessary if you've incorrectly created the myfolders for some reason.
@tomcarey How does it not work? Is the library not assigned? Note that what you're doing there is creating a macro variable that's not used and assigning a library. If this is for one of the courses I think the path should be longer and have the course folder name as well.
@Reeza, using linux, I have defined the directory as:
~/SASUniversityEdition/myfolders
did I miss anything ?
Is it all lower case in your computer as well? And did you set the shared path to SASUE or myfolders?
thanks for the responses.
I bring up SAS studio from scratch (including starting the Oracle VM VirtualBox), then I select a program that the teacher gave us,
it is listed in the right hand side of SAS Studio and lives in the myfolders directory on my server.
I try to run the prgram but it does not work.
I then go to Edit Autoexec file, select run, (it runs successfully) then I go back and re-run the program and this time it runs.
So I'm guessing the autoexec did not run, or am i missing something?
Here is one of the sampels I tried:
/********************************************************************/
/* This program uses an INFILE statement to read a raw data file. */
/* The INFILE statement includes a full path for Microsoft Windows. */
/* */
/* For UNIX or SAS onDemand: */
/* Replace the INFILE statement with the following statement: */
/* infile "&path/newemps.csv" dlm=','; */
/* */
/* For z/OS: */
/* Replace the INFILE statement with the following statement: */
/* infile "&path..rawdata(newemps)" dlm=','; */
/********************************************************************/
daat work.newsalesemps;
length First_Name $ 12
Last_Name $ 18 Job_Title $ 25;
infile "&path\newemps.csv" dlm=',';
input First_Name $ Last_Name $
Job_Title $ Salary;
run;
proc print data=work.newsalesemps
run;
proc means data=work.newsalesemps average min;
var Salary;
run;
thanks
You have just two lines in your AUTOEXEC.
Check, immediate after entering SAS Studio, by:
1) %PUT PATH = &path; >>> check the log. What do you see ?
Have you got a message that macro variable PATH is not resolved?
2) On left you have Libraries. Expand it - is there a library named ORION ?
Try adding %GLOBAL PATH; in the autoexec - line before the %LET
and check again after entering a new session.
Does it help?
I'm using SAS UE in linux. After checking several options I found:
1) You are right, %LET PATH doesn't work
2) Changing the macro variable to ROOT or MYPATH (and probably ant other valid name) did work.
It seems that sas studio uses PATH for its own needs when launching a new session
and then resets it.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.