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

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
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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-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
  • 10 replies
  • 2966 views
  • 5 likes
  • 3 in conversation