Chapter Contents |
Previous |
Next |
SAS Companion for the Microsoft Windows Environment |
Creating a SAS Automation Object |
Dim OleSAS As Object Set OleSAS = CreateObject("SAS.Application")
Determine Whether the SAS Session is Busy |
If (OleSAS.Busy) Then Response = MsgBox("SAS Session is Busy", vbOKOnly, "SAS Session", 0, 0) Else Response = MsgBox("SAS Session is Idle", vbOKOnly, "SAS Session", 0, 0) End If
Toggle the SAS Session between Visible and Invisible |
This Visual Basic code hides or unhides the SAS session based on its current state.
OleSAS.Visible = Not OleSAS.Visible
Set the Main SAS Window Title of the SAS Session |
OleSAS.Title = "Automation Server" Response = MsgBox(OleSAS.Title, vbOKOnly, "Title Is", 0, 0)
Assign a SAS Data Library and Run a SAS Procedure |
OleSAS.Submit("libname insamp 'c:\sas\insight\sample'; proc insight data=insamp.drug; run;")
End the SAS Session |
OleSAS.Quit Set OleSAS = Nothing
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.