Hello!
I've inherited a piece of VB6 legacy code and, what this particular piece of VB6 code does, is that it creates a "windowed" version of SAS(so, not the batch-mode SAS), runs a script(which takes about 2 hours to finish executing), after which, ideally, it should close the windowed SAS.
Here's the VB6 code snippet that I inherited:
"
Dim OleSAS As Object
Set OleSAS = CreateObject("SAS.Application")
OleSAS.Visible = True
OleSAS.Top
OleSAS.Command ("include '" + "X:\DATA\DAILYRUN.SAS")
OleSAS.Command ("submit")
pause 60 * 30 'wait 30 minutes, because SAS runs asynchronously
OleSAS.Quit
Set OleSAS = Nothing
"
The reason I am posting in here is that I have had co-workers(who know pure SAS very well), suggesting that I ask in here if there isn't a reliable way of getting SAS to recognize when the script it is running has completely finished, after which the statements that would close SAS would be called upon.
I guess my question is whether there is a property or statement that would allow me to replace the last 3 lines of the snippet code with something like this:
"
If OleSAS.ScriptExecutionFinished Then
OleSAS.Quit
Set OleSAS = Nothing
End If
Also, I hope I posted in the right forum, my reasoning was that a VB6/SAS issue is closer to MS Office than "ODS and Base Reporting", but, if I am wrong, I can move the thread to the "ODS" forum.
Thank you!