05-21-2015 12:20 PM
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:
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.
05-21-2015 01:31 PM
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.)
05-21-2015 01:53 PM
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.