Date: Fri, 3 Feb 2006 12:35:16 -0800
Reply-To: "Pardee, Roy" <pardee.r@GHC.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Pardee, Roy" <pardee.r@GHC.ORG>
Subject: Re: SAS and DOT NET
Content-Type: text/plain; charset="us-ascii"
FWIW--here's how I'm doing it from an asp.net app:
Private Function RunSasProgram(ByVal ProgName As String) As String
Dim BaseName As String =
System.IO.Path.Combine(System.IO.Path.GetDirectoryName(ProgName),
System.IO.Path.GetFileNameWithoutExtension(ProgName))
Dim si As New System.Diagnostics.ProcessStartInfo
Const DQ As String = """"
With si
.FileName = ConfigurationSettings.AppSettings("SASExe")
.Arguments = "-sysin " & DQ & BaseName & ".sas" & DQ _
& " -log " & DQ & BaseName & ".log" & DQ _
& " -print " & DQ & BaseName & ".lst" & DQ _
& " -emailsys smtp " _
& " -emailhost " &
ConfigurationSettings.AppSettings("SMTPServer")
End With
System.Diagnostics.Process.Start(si)
Return "Congratulations--SAS Program """ &
System.IO.Path.GetFileName(ProgName) & """ has been generated and
submitted. You should see results in your e-mail inbox within a couple
of hours."
End Function
Non-linebreak-damaged version here:
http://rafb.net/paste/results/AnxoIg40.html
Very pedestrian, but hey--it's working...
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
David
Sent: Thursday, February 02, 2006 1:35 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: SAS and DOT NET
> Can we have the front end on .NET and back
> end on SA?.
According to the SAS manual: "SAS can perform as an OLE automation
server. This means that you can use an application that can act as an
OLE automation controller (such as Visual Basic) to create a SAS session
and control it using the methods and properties that SAS makes
available."
I've never tried it, but I can't see why you couldn't call SAS from VB
or C#. That doesn't make it a .NET application though, and you can't
compile SAS to the IL. (I really hope than one day someone will find a
way to make everything target the same VM and be able to call each
others libraries).