BookmarkSubscribeRSS Feed
Fisher
Quartz | Level 8

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

5 REPLIES 5
Patrick
Opal | Level 21

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

Tom
Super User Tom
Super User

%SYSLPUT (and the reverse %SYSRPUT) will work for macro variables.

Tom
Super User Tom
Super User

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.

Fisher
Quartz | Level 8

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.

Quentin
Super User

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.

BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 3374 views
  • 6 likes
  • 4 in conversation