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

Hi all, 

 

I would like to retrieve SAS dataset from remote to local drive when executing a SAS job via SAS Integration Technologies. 

 

The scenarios is as below:

I have 2 servers. On server1, SAS 9.4M2 is installed. And on server2, it is not. And, I would like to utilize SAS power on server1 from server2 where SAS is not installed. 

And, a Java program has been made to execute SAS program on server2 via SAS Integration Technologies. 

My goal is to solve:

  • Run SAS program on server2
  • Generate SAS datasets to the drive of server2

If not considering the shared filesystem, how can it be implemented by Java code and SAS Integration Technologies? 

 

Do you have any idea? 

Many thanks in advance. 

 

 

BR./Edward

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

@EdwardJin wrote:

Hi Kurt, 

 

Thanks for your advice. And, we thought about that. 

However, the path of the dataset is hardcoded in some of the SAS programs.



BAD IDEA. I'd fix that first and restructure the code so that things like that can be easily controlled by setting parameters.
Hardcoding is already biting you in the behind.



The thing is how can we not change any program, and still get the dataset at the same place. 


You could run the program remotely and then use sftp or similar to copy the dataset to the network share server.

 

 

View solution in original post

9 REPLIES 9
EdwardJin
Obsidian | Level 7

Hi Kurt,

The filesytem where the dataset is located is shared to users' Windows PCs, and SAS client is installed on the PCs. 

Hope it explains. 

 

BR./Edward

Kurt_Bremser
Super User

@EdwardJin wrote:

Hi Kurt,

The filesytem where the dataset is located is shared to users' Windows PCs, and SAS client is installed on the PCs. 

Hope it explains. 

 

BR./Edward


Then have the share also mounted on the SAS server, and define a library to it. Then write to that, and the datasets are instantly available for all the PCs.

EdwardJin
Obsidian | Level 7

Hi Kurt, 

 

Thanks for your advice. And, we thought about that. 

However, the path of the dataset is hardcoded in some of the SAS programs.

The thing is how can we not change any program, and still get the dataset at the same place. 

 

 

BR./Edward

Kurt_Bremser
Super User

@EdwardJin wrote:

Hi Kurt, 

 

Thanks for your advice. And, we thought about that. 

However, the path of the dataset is hardcoded in some of the SAS programs.



BAD IDEA. I'd fix that first and restructure the code so that things like that can be easily controlled by setting parameters.
Hardcoding is already biting you in the behind.



The thing is how can we not change any program, and still get the dataset at the same place. 


You could run the program remotely and then use sftp or similar to copy the dataset to the network share server.

 

 

EdwardJin
Obsidian | Level 7
Kurt,
You can be right.
Thanks for the valuable suggestion.

BR./Edward
LinusH
Tourmaline | Level 20
You cannot run a SAS program where SAS isn't installed, but you can call SAS via IOM (like you said initially but later confused).
Why do you want to store a SAS data set where SAS isn't installed? It needs SAS to be processed. And why not consider a share? Seem like the natural thing to consider. Perhaps you can move it using ftp or other file transfer mechanism.
Data never sleeps
EdwardJin
Obsidian | Level 7
Hi Linus,
The filesystem where the dataset is located is shared to users' Windows PCs, and SAS client is installed on the PCs.
The 2 servers are cloned except for SAS. But, we are trying to separate the servers as possible as we can on function wise.
LinusH
Tourmaline | Level 20
No it doesn't for me at least. Why can't it be shared?
Data never sleeps

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 9 replies
  • 1294 views
  • 1 like
  • 3 in conversation