BookmarkSubscribeRSS Feed
alexandravieira
Fluorite | Level 6

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

3 REPLIES 3
Ksharp
Super User
Use
%put _all_ ;

Check if there is a automatic macro variable
&_sasprogramfile
in LOG .
alexandravieira
Fluorite | Level 6

Apologies, I should have mentioned that I did %put _all_; and didn't find any macro variable that contained the program name.

JackHamilton
Lapis Lazuli | Level 10

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.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 688 views
  • 0 likes
  • 3 in conversation