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

Hi,

In Enterprise Guide 4.3, my data is spread across two different servers, sasapp & sasapp1.

I know after writing a program I can right click and change what server I want to run the code on, however, I need to append 2 pieces of data from each server together and therefore need to run code on the 2 different servers within 1 program.

Example:

LibraryA.Dataset_A - Resides on Sasapp Server

LibraryB.Dataset_B - Resides on Sasapp1 Server

I would like to achieve the following:

Data All_Data;

     set LibraryA.Dataset_A

          LibraryB.Dataset_B;

run;

Is this possible?

Regards,

cxkev


1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

SAS EG is a client which generates code. This code is then sent to a server for execution and EG allows you to surface the result.

For your 2 Server scenario:

- The easiest way would be to only use 1 server so if possible create libnames on this one server pointing to the 2 data sources (folders) you need

- If this is not possible (server 1 has not access to file system of server 2) then you need to connect the 2 SAS servers. You would create a session on server 1 and then in your code use SAS/Connect (rsubmit) to create a session on server 2. So with EG create a session on Server 1, send code to server 1 and this code then creates a session on server 2 (SAS/CONNECT). You then download the data from server 2 to the session on server 1 and join the data on server 1.

- You have a local SAS installed (=a 3rd server). You use SAS/Connect in a local session to connect to both Server 1 and Server 2, you download the data from both servers to your local sessions (with proc download or remote library services), and then combine the data in your local SAS session.

View solution in original post

2 REPLIES 2
Patrick
Opal | Level 21

SAS EG is a client which generates code. This code is then sent to a server for execution and EG allows you to surface the result.

For your 2 Server scenario:

- The easiest way would be to only use 1 server so if possible create libnames on this one server pointing to the 2 data sources (folders) you need

- If this is not possible (server 1 has not access to file system of server 2) then you need to connect the 2 SAS servers. You would create a session on server 1 and then in your code use SAS/Connect (rsubmit) to create a session on server 2. So with EG create a session on Server 1, send code to server 1 and this code then creates a session on server 2 (SAS/CONNECT). You then download the data from server 2 to the session on server 1 and join the data on server 1.

- You have a local SAS installed (=a 3rd server). You use SAS/Connect in a local session to connect to both Server 1 and Server 2, you download the data from both servers to your local sessions (with proc download or remote library services), and then combine the data in your local SAS session.

cxkev
Fluorite | Level 6

Thanks for your help Patrick.

Kevan

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2 replies
  • 2861 views
  • 0 likes
  • 2 in conversation