DATA Step, Macro, Functions and more

Execute sas/macro from .net web page

Reply
Super Contributor
Posts: 398

Execute sas/macro from .net web page

I'm currently trying to generate a sas file in my web page and then execute the sas file from my "C#" web page.   The sas file i'm creating has macros that references.  I would like to know what the best approach would be to execute this file on my web server? I've used sas to execute the file in the past, but would like to know if there are better options with IOM that could do this faster and cleaner.

Thank you

Trusted Advisor
Posts: 1,300

Re: Execute sas/macro from .net web page

Using the COM objects that are available through the Integration Technologies Client from SAS (which is IOM) would be the cleanest way to accomplish your described tasks.  There are tons of example available for this using the various .NET languages such as C# and will work with either local or remote SAS installations.

Here is a link to the documentation you need, this is version 9.2:

https://support.sas.com/documentation/cdl/en/itechwcdg/61500/PDF/default/itechwcdg.pdf

The next best resource are the Windows Help Files (.chm files) that come along with the client installation, which you can download for free from the SAS webpage, if you do not have it install already and do not have an accessible software depot with it.

SAS Institute Inc. Software Downloads

Super Contributor
Posts: 398

Re: Execute sas/macro from .net web page

Thank you FriedEgg,

I will do more research on your suggestions and I will post my conclusions.

Thank you so much.

Super Contributor
Posts: 398

Re: Execute sas/macro from .net web page

Hi FriedEgg,

Do you know if SAS offers any training classes on integrating SAS and Microsoft .Net?

Thank you,

Jerry

Trusted Advisor
Posts: 1,300

Re: Execute sas/macro from .net web page

Jerry,

I am not aware of any current training classes that focus on the SAS/Integration Technologies suite.  There are plenty of additional resources online through papers published at various SAS conferences over time.  One such resource from Chris@SAS's blog may be a good starting point for you as it comes with a nice introductory section and a copy of the paper's code on GitHub.

http://blogs.sas.com/content/sasdummy/2013/06/09/sas-client-with-microsoft-dot-net/

Community Manager
Posts: 2,757

Re: Execute sas/macro from .net web page

Aside from my paper that referenced, I have a book about using .NET to build custom tasks in SAS Enterprise Guide and SAS Add-In for Microsoft Office:

http://go.sas.com/customtasksapi

I am also currently working on a building a course (offered through SAS Education) that covers this topic.  (Internal SAS test teach is next week!)

Chris

Super Contributor
Posts: 398

Re: Execute sas/macro from .net web page

Thank you again for pointing me in the right direction.  This is a massive project I'm working on and any help is appreciated.  I have create a website that creates data files on demand for many users simultaneously.  I want to make sure I start off using the correct approach.

Thank you again for your help.

Trusted Advisor
Posts: 1,300

Re: Execute sas/macro from .net web page

Not knowing the project, I would first question whether building an entire application is necessary for this, or whether it can be accomplished through a using stored procedures deployed as web apps.

Ask a Question
Discussion stats
  • 7 replies
  • 648 views
  • 6 likes
  • 3 in conversation