Raunak Thomas
Raunak Thomas

Reputation: 1403

SAS EG Local submit

rsubmit;
  <Code>
endrsubmit;

This is useful if u are connected to the local server and you want to run a code on the remote. But how do I run a local script from the remote server? Is there something equivalent to localsubmit?

Additional Info:

I run most of my codes on the remote server because it is faster but I need to use the local SAS in two instances

Upvotes: 1

Views: 1550

Answers (2)

Joe
Joe

Reputation: 63424

If I understand properly, at least for the second example there's a fairly common use case here.

What you'd do is to run the main program in rsubmit, and then in non-rsubmit block download the dataset created from the rsubmit block.

libname rwork slibref=work server=<yourserver>;

See this KB article for more information.

Then you could do it easily:

rsubmit server=myserver;
  data class;
    set sashelp.class;
  run;
endrsubmit;

libref rwork slibref=work server=myserver;

data l_class;
  set rwork.class;
run;

proc export data=l_class ...;
run;

Or even skip the l_class dataset and directly export from rwork.

For the first scenario, a large part depends on why you can't just not use rsubmit. Is the program located on the remote server, and you can't directly access it? You'd want to talk to IT I guess to find out how to directly access it.

Upvotes: 1

Allan Bowe
Allan Bowe

Reputation: 12691

You can only run code locally (on the machine on which EG installed) if you have a Base SAS licence. You will know this is the case if you open your SAS program (in EG), and check the values in the "Selected Server" dropdown. If you have a 'local' option you can run locally.

There is no concept of localsubmit. If you wanted to run code on your machine and trigger it from the server, your local machine would have to be configured as a SAS/Connect server and you would use rsubmit (with appropriate connection profile) from that server to your local machine. This would be a highly unusual scenario!

Upvotes: 1

Related Questions