Hi Marc,
The _CLIENTMACHINE macro variable is defined in the EG initialization code that is submitted by EG when a connection is first made to a workspace server. Therefore, you can use that macro variable in the "Submit SAS code when server is connected" option (in Tools->Options->SAS Programs), including to define your own macro variable that uses it. For example, I added this code to the "Submit SAS code when server is connected" option:
%let myMacroVar=client machine: &_CLIENTMACHINE;
Then, when I submit "%put &myMacroVar;" in a new EG session (which causes a new workspace connection), the new macro is resolved.
That option is stored in the EGOptions.xml file stored in each user's appdata location (ex. %appdata%\SAS\EnterpriseGuide\8). Yes, it is stored in the xml element named "strOnServerConnectSASCode" in each user's EGOptions.xml file. (So, you'd have to edit all the user's EGOptions.xml file to add -- you'd probably want a script.) Yes, you could include code in that option to %include your .sas file to define your macro var. To see the server initialization log, where this code executes, right-click the server in the Servers pane (after you've connected to the server), select Properties, Software, then View Initialization Log.
Casey
... View more