BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
woo
Barite | Level 11 woo
Barite | Level 11

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...

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

@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.

 

View solution in original post

10 REPLIES 10
mbuchecker
Quartz | Level 8
Could you clarify a little? Where is the data you want your libname statement pointing to? Is it on server A or Server B? Also, is Server A your 9.4 Linux machine, or is Server A your EG session?
Michelle
woo
Barite | Level 11 woo
Barite | Level 11

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.

mbuchecker
Quartz | Level 8
There are multiple options. PROC DOWNLOAD would probably be the easiest though.
Michelle Buchecker
Michelle
Tom
Super User Tom
Super User

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;
woo
Barite | Level 11 woo
Barite | Level 11

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;

 

 

mbuchecker
Quartz | Level 8

Try:

ODS HTML CLOSE;

 

to turn off generating HTML 

Michelle
woo
Barite | Level 11 woo
Barite | Level 11

not quite sure where exactly it should goes,

 

I tried before proc print and after but still it is generating html output. - thanks.

 

 

mbuchecker
Quartz | Level 8

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.

Michelle
Tom
Super User Tom
Super User

@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.

 

woo
Barite | Level 11 woo
Barite | Level 11

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 10 replies
  • 3653 views
  • 5 likes
  • 3 in conversation