DATA Step, Macro, Functions and more

Integrate other Languages?

Reply
N/A
Posts: 0

Integrate other Languages?

Hi everyone,

I am not sure where to post this query, so I apologize in advance. As an analyst who is trying to prep himself for the future of being an 'Analyst' I am trying to figure out what languages and software I should be learning.

I am new to SAS, but see how powerful it is. In full disclosure, I typically lean towards a competitor's product since I can add the python code directly into my program, but I am thinking of making the switch to SAS for professional reasons. Can SAS integrate other languages into code, more specifically, perl, python, or even R?

Outside of statistical analysis on an existing SAS dataset, I want to get data from the web, work on multiple files in a directory, etc., and figure that I would have to compliment SAS with another language.

Any help will be GREATLY appreciated!

- Brock
Super Contributor
Super Contributor
Posts: 3,174

Re: Integrate other Languages?

Today's SAS solutions go far beyond the statistics analysis focus-area with many integration options and solution choices, while offering numerous OS and computing platform choices with scalability in consideration.

Suggest you start with the SAS support http://support.sas.com/ website with its supplemental technical (white papers, conference sessions, technical tips/notes, position paper references) resources, and where you think there might not be a specific input or output delivery point with the SAS architecture, then state the requirement to determine what specific options / alternatives exist.

Scott Barry
SBBWorks, Inc.


Products and Solutions - by focus area and industry:
http://www.sas.com/software/


Using Perl As A Front-End For SAS® Database Updates
John Shingler, CSIS Project, Penn State University, Pennsylvania
Mollie Van Loon, CSIS Project, Penn State University, Pennsylvania
Kenneth Rosenberry, Center for Academic Computing, Penn State University
http://www2.sas.com/proceedings/sugi30/167-30.pdf


Relational Database Schemes and SASÒ Software SQL Solutions
Sigurd W. Hermansen, Westat, Rockville, MD, USA
http://www2.sas.com/proceedings/sugi24/Advtutor/p49-24.pdf


Third Party Software Requirements for use with SAS® Products
http://support.sas.com/resources/thirdpartysupport/index.html


SAS Focus Areas
http://support.sas.com/rnd/


SAS Technical Papers
http://support.sas.com/resources/papers/
Super User
Posts: 5,256

Re: Integrate other Languages?

Just like to add that R will be/are supported in SAS/IML.

/Linus
Data never sleeps
N/A
Posts: 0

Re: Integrate other Languages?

Hi Everyone,

Thanks for the help (I was wondering where the R package fit in).

But please do not be offended, but can you talk to me even simpler than this.

Say I have a SAS program (syntax). Can I integrate Python, R, Perl, etc. directly intp my SAS Code, or do I need external libraries (can't be run in Base SAS) and a combination of other things?

I am VERY new to SAS, so the language and terminology are foreign to me at this point. The Perl as a frontend to SAS example was great, but truthfully it means nothing to me since I do not see how it creates a SAS dataset. Additionally, from what I gather, that is a Perl file and not a SAS program.

Like I said, my previous experience is that I can simply refer to another language in my syntax and continue on with my code. This makes it easy for me to distribute programs to coworkers who are not as technical as I am.

I guess what I am looking for is this - inside of SAS code, can I type a python or perl procedure? Can I loop thru files in a directory in SAS code. Given I am new, I probably should not be asking these kind of questions, but it will help me make my decision as to what software/languages I want to learn.

MANY thanks,

Brock
Super Contributor
Super Contributor
Posts: 3,174

Re: Integrate other Languages?

Yes, your questions are quite valid, as it relates to a a SAS application, albeit external interface perspective. There are supported "write your own module" interface, some more straightforward than others, and you do have SAS-supported external function calls, for example, to read an OS directory/folder structure and perform tasks/functions/programs against the results of that process.

There are obvious considerations about the SAS installed software location, whether local or remote, so you will want to factor your SAS server/client implementation strategy into your early design / architecture work-effort.

I am unsure about whether you can do a direct-call to Python or Perl procedure, from a SAS DATA step -- possibly it may or may not be necessary to perform some specific function or task? Again, some consideration to weigh in your early project scoping for trade-off considerations about where you are going (forward) with or without SAS being a strategic solutions development environment.

Scott Barry
SBBWorks, Inc.
Super User
Posts: 5,256

Re: Integrate other Languages?

If you are looking for seamless integration, CALL MODEULE (Base) and CALL MODELEI (IML) and their corresponding function comes into mind. They can be used for calling compiled external modules.

Another way to call external programs is to use the PIPE filename device, which let you interact (at least read output from) OS scripting languages. I have no own experience, but should be able to call Perl programs this way...?

/Linus
Data never sleeps
Ask a Question
Discussion stats
  • 5 replies
  • 476 views
  • 0 likes
  • 3 in conversation