BookmarkSubscribeRSS Feed
deleted_user
Not applicable
When running a stored process, our code needs to be able to determine the full path of the code submitted by the stored process.

You can use the following when running SAS in batch mode:

%put %sysget(SAS_EXECFILEPATH);

Does anyone know of a similar function that would work for Stored Processes in Enterprise Guide?

Thanks
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
On this web site, refer to the explanation of the _PROGRAM reserved macro variable:
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html

You may have to change some of your program logic because the path that can be part of the returned value of &_PROGRAM is the metadata repository path ... not the operating system path where the stored process is stored.

cynthia
deleted_user
Not applicable
Thanks very much for the suggestion. The _Program macro variable doesn't seem to be getting generated when we run the stored process:

WARNING: Apparent symbolic reference _PROGRAM not resolved.

Any suggestions?
Cynthia_sas
SAS Super FREQ
This is probably a question for Tech Support then. I know that sometimes the reserved macro variables are available on all clients and then sometimes, they're not created or used by a particular client. So you could call that stored process from one client and &_PROGRAM would be available to your program but from another client, it would not be available because you client does not use or surface that macro variable. If &_PROGRAM is not available for your usage situation, it's possible that Tech Support knows of a workaround for you.

To contact Tech Support, go to:
http://support.sas.com/techsup/contact/submit_emits2.html

cynthia
JohnB
SAS Employee

 

If you are using SAS® Enterprise Guide® or SAS® Studio, the macro variable _SASPROGRAMFILE can be used. This macro variable returns the full path and filename of the SAS program that is currently being run. This macro variable is available only for SAS program files that are saved on the same server on which your SAS Studio code or SAS Enterprise Guide session is running. For example:

 

 

%put &_SASPROGRAMFILE;

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!

SAS Enterprise Guide vs. SAS Studio

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.

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
  • 4 replies
  • 4576 views
  • 2 likes
  • 3 in conversation