- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there any way in which we can automate the conversion of a SAS code to Python.
The automation process not necessarily need to be in SAS, it can also be in python with some predefined python library.
Any link to the solution or some predefined workflow will be really helpful.
Thank you
Regards,
Mayank
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I doubt there's a good way. See this thread with same question:
https://communities.sas.com/t5/SAS-Data-Science/SAS-to-Python/td-p/729384
If you google a bit you'll fine companies selling translations / translators, but I'm not sure I would trust them. One has a 90% guarantee. Hard to imagine something worse than correctly translating 90% of a program into a new language.
If you're going to switch to python, probably better to invest in hiring / learning python, and have python programmers sit down with requirements and build in python. SAS code is pretty easy to read, so if you have requirements, SAS code, and a few people who know SAS, would think it could be done. Of course it's a big migration (potentially), you might want to rearchitect your full analytic environment at one time, not just switch the language.
Next up: Troy Martin Hughes presents Calling Open-Source Python Functions within SAS PROC FCMP: A Google Maps API Geocoding Adventure on Wednesday April 23.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Check SASPy
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I doubt there's a good way. See this thread with same question:
https://communities.sas.com/t5/SAS-Data-Science/SAS-to-Python/td-p/729384
If you google a bit you'll fine companies selling translations / translators, but I'm not sure I would trust them. One has a 90% guarantee. Hard to imagine something worse than correctly translating 90% of a program into a new language.
If you're going to switch to python, probably better to invest in hiring / learning python, and have python programmers sit down with requirements and build in python. SAS code is pretty easy to read, so if you have requirements, SAS code, and a few people who know SAS, would think it could be done. Of course it's a big migration (potentially), you might want to rearchitect your full analytic environment at one time, not just switch the language.
Next up: Troy Martin Hughes presents Calling Open-Source Python Functions within SAS PROC FCMP: A Google Maps API Geocoding Adventure on Wednesday April 23.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @Mayank_61
I agree with what @Quentin has suggested.
SAS and Python are two different application softwares which perform identical set of tasks for example data analysis, statistics etc in their own distinct way. But there is no one to one corrospondence between a function in SAS with that in Python. Any translator, if available, may not be effiecient.
It is better to focus on the task a SAS program does and write the same job in Python. This will require more resources in development but save time in debugging a faulty translation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I am just doing a market research on Automatic tool/services for translating from SAS code to python (don't want to use them).
So far, I found wise with data, SAS2PY and Semantic Designs.
Would you please name the translator tool/services if you know any more?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
please look at https://www.wisewithdata.com/sas-to-pyspark-migration-solution-2/
This company I found in addition to the two you already listed.
I found in addition a Web based tool doing translations between differnt programming languages. This tool offers a lot of programming languages including SAS and Python.
- Tags:
- python
- sas
- translator
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
We tested and fond that our tool perform far better than wisewithdata, leap logic, sas2py and symantic designs
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What I said in the thread @Quentin linked to still holds true. Start with the original requirements, and have the program(s) rebuilt from scratch by (a) Python specialist(s). Don't even think about a "conversion" that will have you end up with a piece of unmaintainable junk.
If this proves to make no sense economically, stay with SAS.
Keep in mind: this is not like translating PASCAL to C. The paradigms are completely different.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Just to add to the specific SAS to Python code conversion discussion, I've never seen a reliable, automatic way to convert from ANY computer language to ANY other one where the architecture and syntax is radically different. It's a different story where you have different flavours of the same computer language like SQL, BASIC, C and so on but that's not what we are talking about here. And let's not get started on software that's incompatible between versions...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Mayank,
We have exactly done the same. We have parsed SAS code and converted into Python code. We were able to achieve 95% during the automation process and 5% manual intervention is needed to do some configuration etc. If you are interested, you can reach out to me and discuss in detail.
My name is Varatharajkumar (Als.) Arjun, from Chennai, India. I am the Founder and COO of Rushmore Technologies Private Limited.
My Mail id : arjun@rushmoretech.in
Mobile No: +91 9840171191.
You can feel free to reach me anytime at your convenience. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello there world
My name is Luis Ilabaca - I am a consultant and have worked on various projects working on SAS, Python, AWS... etc
If you are working on a SAS to Python conversion ( of many many codes ) please let me give you a 20 minute presentation.
in it i will demo some tools and give you a presentation - and at the bare minumum it would just be "wasted 20 minutes" but hope you can walk away with many good ideas
the nature of programming is open source so i would like to show you concrete solutions on how to approach this problem.
you can reach me at LuisIlabaca3@gmail.com ( also you can see my linked in but i admit i don't always log in there - and the bots in linked in now a days flood your inbox )
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have also found an ai based code converter website that works seamlessy for free