BookmarkSubscribeRSS Feed
sameer112217
Quartz | Level 8

Hello!

 

Can anyone help me.

 

I have two server or environment on which I am working. I have one dataset named smart.org on the second server. I need to transfer the dataset to the first server in the work library so that I can use it to join one of my output table. Take example for referece

 

First Server

sample1.app.server1.com   port 8564

sample2.app.server2.com   port 8562

 

Both have common username and id

username: sam1122

password  analytics1122

 

I am currently logged in and working in the second server sample2.app.server2.com and want to read the dataset from the first server from the library smart and pull the dataset org and store it in the work library in the current environment

 

The path of smart library in the first server is sks/emea/data/sm. What  code I need to write in the second server in EG to pull the data. I am aware of unix/putty transfer via scp command or winscp but I want to use proc download/upload or something in the code to do that. does anyone help me with code.. how can i log in and read data from another server.

 

I have already created output file named work.incentive in the first server whcih has fields like salesname, salesperson, salary. I want to join the field department from smart.org to the incentive output. I know about join part though

6 REPLIES 6
SASKiwi
PROC Star

Do you have SAS/CONNECT installed and licensed on both servers? If you do then PROC DOWNLOAD or UPLOAD is a good option.

 

Also what operating systems do the two SAS servers run on? Are they the same or not? If they are not the same and you don't have SAS/CONNECT then another option is to use PROC CPORT to create a transport file, FTP it to the other server in BINARY mode, then CIMPORT it on the other server.

 

sameer112217
Quartz | Level 8
We have same operation system. I want the code for Proc download and upload. My main issue is how can I go to other server and read the file from there. Basically the other server is production server and I am using testing server
Patrick
Opal | Level 21

@sameer112217

A lot of sites have a full separation between PROD and DEV/TEST environments. If so then the likely only way to move data from one environment to the other is via your local environment (your client). 

If using SAS EG download the data to your PC/Laptop environment, connect to the other server, upload the data and then process the data in your target server environment.

 

If there is a connection between your two servers possible and you've got SAS/Connect then you can also directly create a remote sesstion on your other server and then transfer the data from this server to your calling environment.

sameer112217
Quartz | Level 8
Thanks for the reply. Does anyone know how to create remote session on host server. Code please. Thanks
andreas_lds
Jade | Level 19

I don't know it, but i am sure that papers exist describing the technique in full-detail. So please, use the search engine.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 6 replies
  • 1085 views
  • 0 likes
  • 4 in conversation