I am trying to learn more about using VBScript to run SAS processes. I have written the script below just to open and run a few code files in SAS EG, but this is as far as I got. Is there any good reference for this?
'Set ErrorHandler
On Error Resume Next
'Run Daily
ProjectName = "\\Nasvs1\Shared\4700Mac\Shared3\Actuarial\SAS\Projects\ISO.egp"
Files = Array("LIBRARIES", "PLCY")
Call Work(ProjectName, Files)
'Define Functions
Sub Work(ProjectName, Files)
Set App = CreateObject("SASEGObjectModel.Application.4")
Set Project = App.Open(ProjectName,"")
Set Container = Project.CodeCollection
For Each File In Files
For Each Object In Container
If Object.Name = File Then Object.Run
Next
Next
Project.Save
Project.Close
End Sub
'Reset Error Handler
On Error Goto 0
Christopher Johnson
www.codeitmagazine.com