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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.