Hello,
my goal is kick off sas (9.4 on linux) eg job from server-A and remote submit code on server-B (so job will be running here on server-B) and get results back on Server-A.
I am not sure how to define libname statement to achieve it,
I am trying with below statement which doesn't seems working,
libname remote "serverA.com:\test"
please help...
@woo wrote:
Thanks Tom and Mbuchecker.
Anyway to NOT generate default html output when getting data back on server-A, I can use just SAS dataset. generating html takes lot of time.
* back on serverA;
proc print data=localds;
run;
Why is the code you want to submitted to a remote server generating ANY output?
You could include try using ODS _ALL_ CLOSE in the rsubmit block to turn off all output destinations, but it would probably be better to only run code that doesn't generate any output to begin wiht.
Or is that your whole point and your use of LIBNAME in the original question just causing confusion?
You can use PROC DOWNOAD to move files in addition to datasets. So if you generated HTML in the remote session to a file named serverb.html you could run PROC DOWNLOAD at the end of the remote code to copy that to a file on the local session.
Or just use a shared disk that all sessions can wrtie/read.
thanks.
both servers has sas 9.4 installed on Linux.
here is the case,
- running sas eg job from server-A
- this job has remote submit code which is asking sas to run job on server- B - which is happening fine
- sas job runs without error
- since sas job executing on server - B - output is happening there
- I want output on server- A
hope that make sense.
What do you mean by "output"? I will assume because you mentioned libname that you mean datasets.
You could just download them.
* running sas eg job from server-A ;
rsubmit serverB ;
* running job on serverB ;
data remoteds;
....
run;
proc download data=remoteds out=localds status=n; run;
endrsubmit;
* back on serverA;
proc print data=localds;
run;
You can also look into the INHERITLIB= option on the RSUBMIT/SIGNON commands.
libname local 'path1';
rsubmit serverb INHERITLIB=(local) ;
data local.want ;
....
run;
endrsubmit;
proc print data=local.want;
run;
Thanks Tom and Mbuchecker.
Anyway to NOT generate default html output when getting data back on server-A, I can use just SAS dataset. generating html takes lot of time.
* back on serverA;
proc print data=localds;
run;
Try:
ODS HTML CLOSE;
to turn off generating HTML
not quite sure where exactly it should goes,
I tried before proc print and after but still it is generating html output. - thanks.
It should go before the PROC PRINT. Perhaps WAY before the PROC PRINT. My guess is that some report is generating on Server B, and then being shown. Try putting the ODS HTML Close; in your RSUBMIT block.
@woo wrote:
Thanks Tom and Mbuchecker.
Anyway to NOT generate default html output when getting data back on server-A, I can use just SAS dataset. generating html takes lot of time.
* back on serverA;
proc print data=localds;
run;
Why is the code you want to submitted to a remote server generating ANY output?
You could include try using ODS _ALL_ CLOSE in the rsubmit block to turn off all output destinations, but it would probably be better to only run code that doesn't generate any output to begin wiht.
Or is that your whole point and your use of LIBNAME in the original question just causing confusion?
You can use PROC DOWNOAD to move files in addition to datasets. So if you generated HTML in the remote session to a file named serverb.html you could run PROC DOWNLOAD at the end of the remote code to copy that to a file on the local session.
Or just use a shared disk that all sessions can wrtie/read.
thanks Tom. I used it outside of rsubmit/endrsubmit block and it worked fine.
endrsubmit;
ODS _ALL_ CLOSE;
prod print data....
ya, so I was trying to define libname statement to output final datasets to serverB.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.