BookmarkSubscribeRSS Feed
wpg_unc
Fluorite | Level 6

I am wondering if there is a way to set the client task label (program label) from within the program code?  When I execute a SAS program the Log shows the current program name using:

%LET _CLIENTTASKLABEL='ProgramName';

I would like to set the program name from within the code so I do not have to do it using the interface.  I have another application that generates SAS programs that I just copy and paste into Enterprise Guide, but as part of the code generation it would be nice if it set the program name as well.

many thanks

2 REPLIES 2
CaseySmith
SAS Employee

There is not currently a way to set the label of a program node in EG programmatically via SAS code.  However, you could set it programmatically using EG's automation/scripting interface.  Attaching a VBScript code example that will do it.  (Technically, you could write out the VBScript file and execute it (if ALLOWXCMD) using SAS code, but the VBScript would be what actually interfaces with the EG automation API and changes the name of the program element.)


(Note: If you open a .sas file in EG, the label of the program node in EG will match the file name, and it cannot be changed.)


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

wpg_unc
Fluorite | Level 6

Thanks for the reply and the automation information.  VB scripting is probably more work than simply renaming the program labels manually, so I suppose I will stick with that.

cheers

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 2048 views
  • 0 likes
  • 2 in conversation