Like &_CLIENTTASKLABEL in EG, that gave you the name of the .sas, is there such a thing for sas studio / sas viya?
[edited] I did %put _all_; and couldn't find any macro variable with the program name. I'm not looking for a solution based on a macro var necessarily, I'm looking for any sort of solution
Apologies, I should have mentioned that I did %put _all_; and didn't find any macro variable that contained the program name.
Another place to look is in the external files list:
data _null_;
set sashelp.vextfl;
put 10*'*' (_all_)(=/) / 10*'*';
run;
That doesn't show anything interesting for SAS Studio programs run the foreground, but for a background job you will see something like
**********
fileref=_BTCHLOG
xpath=/home/c449630/sas/sysparm.log
xengine=DISK
modate=09MAR21:10:55:56
filesize=8310
level=0
directory=no
exists=yes
temporary=no
**********
The batch log is stored in the same location as the source file, with the same base file name, so I can tell that the source file was /home/c449630/sas/sysparm.sas
.
That probably doesn't help you, as you didn't say you were running in background mode, but it might help someone else. There's also a STDIN fileref, which isn't useful in this case, but might be helpful at some other time.
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!
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.