Did you know Base SAS can execute Python code? Starting with May 2019 release of SAS 9.4M6, the PROC FCMP procedure added support for submitting and executing functions written in Python from within a SAS session using the new Python object. Proc FCMP is where you create your own SAS functions, and this alone is a brilliant way of cleaning up your code. Now with 9.4M6 you can also execute python functions.
It could look like this simple example below, and there are many good sources to study such as blogs and SAS Documentation (links below snippet).
The necessary steps are these two and are performed where your SAS Foundation is installed:
Add two environment variables in Windows (read doc to learn steps needed for other OS such as linux)
Start SAS and submit this code
Many more examples in SAS Documentation and blog entries.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.