Desktop productivity for business analysts and programmers

Appending data from two different servers

Accepted Solution Solved
Reply
Contributor
Posts: 28
Accepted Solution

Appending data from two different servers

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



Accepted Solutions
Solution
‎07-28-2014 06:46 AM
Respected Advisor
Posts: 4,138

Re: Appending data from two different servers

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


All Replies
Solution
‎07-28-2014 06:46 AM
Respected Advisor
Posts: 4,138

Re: Appending data from two different servers

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.

Contributor
Posts: 28

Re: Appending data from two different servers

Thanks for your help Patrick.

Kevan

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 419 views
  • 0 likes
  • 2 in conversation