Date: Thu, 20 Jan 2005 14:23:27 GMT
Reply-To: Alan Churchill <SASL001@SAVIAN.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Alan Churchill <SASL001@SAVIAN.NET>
Subject: Re: simple gui with SAS
For the download:
This is a beta product but we use its underpinnings daily and it is stable: best of all, it is free. If you want to use a production product, look at Visual Studios .NET. It will set you back a few hundred dollars or very little if you are a student or a member of a university.
For the graphical controls, drag and drop them. This is a simple exercise that can be explored more off line after the code is installed. Drag and drop a button onto the workspace. Drag and drop a textbox onto the workspace, drag and drop a datagrid onto the workspace.
For the connection to SAS (assuming it is local to the machine), double-click your button and place in this code:
private void button1_Click(object sender, System.EventArgs e)
string ErrorMessage ;
WorkspaceManager wsm=new WorkspaceManager() ;
Workspace ws=(Workspace) wsm.Workspaces.CreateWorkspaceByServer("",SASWorkspaceManager.Visibility.VisibilityProcess,null,"","",out ErrorMessage) ;
ls.Submit("data sastest; sasname=1; run;") ;
ls.LineSeparator = "\r\n" ;
string log = ls.FlushLog(1000) ;
log = log.Replace("\f","") ;
textBox1.Text = log ;
System.Data.OleDb.OleDbDataAdapter da=new System.Data.OleDb.OleDbDataAdapter("select * from sastest","provider=sas.iomprovider; SAS Workspace ID=" + ws.UniqueIdentifier);
System.Data.DataSet ds=new System.Data.DataSet();
dataGrid1.DataSource = ds.Tables;
catch (Exception ex)
ws = null ;
Press F5 or go to Build --> Build Solution and it should create an executable for you to submit.
If you make it to this stage and have any issues, please let me know. I'm in between 9.12 and 9.13 install and cannot test this immediately on a fresh system but it should work.
As I have mentioned before, if you want to see the types of GUIs possible, please go to
I would look at Log Analyzer, or SAS to SQL, or SASEncase as examples of what is possible.
"Bridging SAS and Microsoft Technologies"
I'm very interested by yours propositions (earlier discussion about SAS/AF in sas9 opened my eyes about the "bridge between SAS and Microsoft Technologies").
But, I'm newbie with this and lost when I go in the MS site.
We talked about VB.Net, C#...and now you write on Visual Studio express, COM provider ....OK. 8-~
Please, could you send us links about this technology ?
>Date: Thu, 20 Jan 2005 03:24:07 GMT
>De: Alan Churchill
>Sujet: simple gui with SAS
>Visual Studio Express (it?s free). Drag and drop development environment. Hook into SAS via the built-in COM provider in Base SAS.
>Code provided upon request. It is also found on SAS's website and on SAS-L.
>"Bridging SAS and Microsoft Technologies"
>I want to create a simple GUI for some programs. I have only base
>SAS avaiable ( v8 and v9). I will greatly appreciate your suggestions.