BookmarkSubscribeRSS Feed
Coreyw184
Calcite | Level 5

I am using SAS EG to run SAS code for large datasets using a sas server. At the end of my SAS code I would like to include a way to run an R file. Either being able to run R code or just run the entire file would work.

Is there a way to do this? I know that it is possible when you are running the SAS files locally by adding RLANG to your sasv9.cfg file but was not sure if there was a way when using a server?

2 REPLIES 2
yabwon
Onyx | Level 15

1) you have to have R installed on the server,

2) you have to have RLANG option in server's config,

3) you have to have R_HOME system variable set, 

4) you have to have SAS/IML license.

 

In 3) you can set the the variable yourself in the SAS session by setting options:

options set=R_HOME="/path/to/your/R";

eg:
options set=R_HOME="/X/R/R-4.3.1/";

that also means you can have R installed locally in your home directory by yourself.

 

Bart

_______________
Polish SAS Users Group: www.polsug.com and communities.sas.com/polsug

"SAS Packages: the way to share" at SGF2020 Proceedings (the latest version), GitHub Repository, and YouTube Video.
Hands-on-Workshop: "Share your code with SAS Packages"
"My First SAS Package: A How-To" at SGF2021 Proceedings

SAS Ballot Ideas: one: SPF in SAS, two, and three
SAS Documentation



Tom
Super User Tom
Super User

Just have your SAS admin configure the SAS server to have R installed and the RLANG option turned on.

 

Enterprise Guide is just used to submit code to SAS to run. So if your SAS session is set to allow R code to be run you can run it in the SAS code you submit from Enterprise Guide.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 604 views
  • 0 likes
  • 3 in conversation