How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies

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


Accepted Solutions
Solution
‎06-29-2017 06:19 AM
Super User
Posts: 7,433

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies


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.

 

 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Super User
Posts: 7,433

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies

What would be the use of SAS datasets on a server that has no SAS installed?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 18

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies

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

Super User
Posts: 7,433

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies


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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 18

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies

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

Solution
‎06-29-2017 06:19 AM
Super User
Posts: 7,433

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies


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.

 

 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 18

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies

Kurt,
You can be right.
Thanks for the valuable suggestion.

BR./Edward
Super User
Posts: 5,386

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies

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
Occasional Contributor
Posts: 18

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies

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.
Super User
Posts: 5,386

Re: How to get SAS dataset to local drive by running SAS program via SAS Integration Technologies

No it doesn't for me at least. Why can't it be shared?
Data never sleeps
☑ This topic is solved.

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

Discussion stats
  • 9 replies
  • 190 views
  • 1 like
  • 3 in conversation