06-01-2012 03:52 PM
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
06-02-2012 10:26 PM
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
06-03-2012 08:49 PM
You could upload the source code for the macro definition and then either %INC it or autosource it.
filename local 'local path';
filename remote 'remote path';
proc upload infile=local('xxx.sas') outfile=remote('xxx.sas') status=n; run;
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.
06-04-2012 01:44 PM
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.
06-04-2012 03:39 PM
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....