We have a set of standard Macros in our local server. I wonder how to include these macros in my SAS program and run the program in remote server? thanks
If I understand your question right then you're using mp-connect (rsubmit blocks).
If so then below link should answer your question: http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/viewer.htm#a002590516.htm
%SYSLPUT (and the reverse %SYSRPUT) will work for macro variables.
You could upload the source code for the macro definition and then either %INC it or autosource it.
filename local 'local path';
rsubmit;
filename remote 'remote path';
proc upload infile=local('xxx.sas') outfile=remote('xxx.sas') status=n; run;
%inc remote('xxx.sas');
...
Do they change frequently? If not then just copy them to the remote server once and point to them the same way that you point to them on your local SAS sessions.
Thanks Tom and Patrick.
What we don't want is to keep two copies of macros (one in local PC, the other one is in remote UNIX server). Instead we prefer to keep only one set of macros in our local machine to facilitate the management. I didn't try the proc upload yet, but just wonder whether there is any other better way to implement it.
Hi,
One option is to run Samba on the UNIX server. I haven't administered it, but as a user the end result is that the autocall library is sitting on the Unix box, but in windows you can map a drive to it.
So the macro definitions might sit in /autocall
And your PC config.sas would point to Q:/autocall.
That worked great (only gotcha is that on unix, the filenames in the autocall library have to be lowcase!).
I don't have Samba where I'm set up now, so agree it would be nice to have a solution for this. Currently I just copy files from Windos to Unix when I update the macro library, which isn't that often....
--Q.
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.
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.