I have been learning to call SAS from VBScripts, but have had little luck finding resources for this. I have a script that opens as SAS project, runs two code files, Saves, and exits. I need to be able to set a macro variable from the script, but I have no idea how. Here is my script:
'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
Here is the variable in the file PLCY that I would like to set:
%LET INFILE = "&ISODATA.G0024P1_D110415.TXT";
Any help would be greatly appreciated!
Chris
Christopher Johnson
www.codeitmagazine.com