Desktop productivity for business analysts and programmers

Problem with EG 4.3 Scheduler

Reply
N/A
Posts: 1

Problem with EG 4.3 Scheduler

I tried to schedule a EG project. Nothing happened when the project was supposed to run. When I try to run the VBScript EG makes I get following text and nothing happens. Any idea what is the problem?

Error message:

Windows Script Host

Script:     C:\PATHTOTHESCRIPT\EGScript5.vbs

Line:        7

Char:       1

Error:     Object required

Code:      800A01A8

Source:      Microsoft VBScript runtime error

My VBScript is this:

Option Explicit

Dim app

Call dowork

'shut down the app

If not (app Is Nothing) Then

    app.Quit

    Set app = Nothing

End If

Sub dowork()

    On Error Resume Next

    '----

    ' Start up Enterprise Guide using the project name

    '----

    Dim prjName

    Dim prjObject

    prjName = "C:\PATHTOTHEPROJECT\Customer_Flow_Framework.egp"    'Project Name

     

    Set app = CreateObject("SASEGObjectModel.Application.4.3")

    If Checkerror("CreateObject") = True Then

        Exit Sub

    End If

   

    '-----

    ' open the project

    '-----

    Set prjObject = app.Open(prjName,"")

    If Checkerror("app.Open") = True Then

        Exit Sub

    End If

   

       

    '-----

    ' run the project

    '-----

    prjObject.run

    If Checkerror("Project.run") = True Then

        Exit Sub

    End If

   

           

    '-----

    ' Save the new project

    '-----

    prjObject.Save

    If Checkerror("Project.Save") = True Then

        Exit Sub

    End If

   

    '-----

    ' Close the project

    '-----

    prjObject.Close

    If Checkerror("Project.Close") = True Then

        Exit Sub

    End If

      

End Sub

Function Checkerror(fnName)

    Checkerror = False

   

    Dim strmsg

    Dim errNum

   

    If Err.Number <> 0 Then

        strmsg = "Error #" & Hex(Err.Number) & vbCrLf & "In Function " & fnName & vbCrLf & Err.Description

        'MsgBox strmsg  'Uncomment this line if you want to be notified via MessageBox of Errors in the script.

        Checkerror = True

    End If

        

End Function

Contributor
Posts: 69

Re: Problem with EG 4.3 Scheduler

What operating system?

When you say you run the VB Script, how do you go about doing it and what program is running it?

Community Manager
Posts: 2,707

Re: Problem with EG 4.3 Scheduler

You might try a simpler script to see if the mechanism is working.  See:

Not Just for Scheduling: Doing More with SAS Enterprise Guide Automation - sasCommunity

For example, this simple script:

http://support.sas.com/documentation/onlinedoc/guide/examples/SASGF2012/NewApp.vbs.txt

Also, make sure that the script engine that's running is the 32-bit version of CSCRIPT.exe.  These details are in the paper:

http://support.sas.com/documentation/onlinedoc/guide/examples/SASGF2012/Hemedinger_298-2012.pdf

Chris

Ask a Question
Discussion stats
  • 2 replies
  • 867 views
  • 0 likes
  • 3 in conversation