Scheduling a Process Flow to run separately inside an EG Project

Accepted Solution Solved
Reply
Contributor
Posts: 72
Accepted Solution

Scheduling a Process Flow to run separately inside an EG Project

Hi All,

 

I use the Windows task Scheduler to automate running my SAS EG Projects & it all works fine. (Vers 7.13).

 

Now I'm wondering if I get more specific & run a Process Flow I've created in the Project to run at a scheduled time?

 

How It works is that the Task Scheduler runs a Task at a specific time which runs a .vbs script which then runs the SAS EG Project.

 

The .vbs file contains a the path to the SAS EG Project as follows;

 

Sub dowork()
    On Error Resume Next
	
	'----
    ' Start up Enterprise Guide using the project name
    '----
    Dim prjName
    Dim prjObject

    prjName = "H:\Path_to_SAS_Project\Project_Name.egp"    'Project Name
      
    Set app = CreateObject("SASEGObjectModel.Application.7.1")
    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

I'm thinking that the way (if it's possible) to do this is to add to the end part of the path such as;

 

 

"H:\Path_to_SAS_Project\Project_Name\Process_Flow_Name.egp"    'Project Name

 

Can anyone offer any assistance or guidance here?

 

Thanks


Accepted Solutions
Solution
‎03-05-2017 10:12 PM
Super Contributor
Posts: 474

Re: Scheduling a Process Flow to run separately inside an EG Project

Hi.

 

Flows are known as Containers in the Object Automation Model.

 

Check the example bellow on how to access those within the project.

 

https://communities.sas.com/t5/SAS-Enterprise-Guide/Automation-in-EG-using-VBScript/td-p/189324

 

Daniel Santos @ www.cgd.pt

 

 

View solution in original post


All Replies
Contributor
Posts: 46

Re: Scheduling a Process Flow to run separately inside an EG Project

Hi,

 

You need to check this option,"Export All Code in Process Flow or Project" then run that code. It has worked for me in past.

 

 

Just make sure of the following.


The problem will most likely occur when one or more lines in the saved or exported program has data lines greater than 80 characters or program lines such as in PROC SQL that are greater than 255 characters.

 

Hope it helps.

Contributor
Posts: 72

Re: Scheduling a Process Flow to run separately inside an EG Project

Thanks ankit_gupta,

 

I'm not actually exporting any results, I just need to run 'a part' of the Project.

 

Appreciate your post though! 

Solution
‎03-05-2017 10:12 PM
Super Contributor
Posts: 474

Re: Scheduling a Process Flow to run separately inside an EG Project

Hi.

 

Flows are known as Containers in the Object Automation Model.

 

Check the example bellow on how to access those within the project.

 

https://communities.sas.com/t5/SAS-Enterprise-Guide/Automation-in-EG-using-VBScript/td-p/189324

 

Daniel Santos @ www.cgd.pt

 

 

Contributor
Posts: 72

Re: Scheduling a Process Flow to run separately inside an EG Project

Hi 

 

 

 

 

Contributor
Posts: 72

Re: Scheduling a Process Flow to run separately inside an EG Project

Thanks Daniel,

 

Getting the actual code with the 'Container' part really made it easy for me.

 

Thanks !

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 294 views
  • 1 like
  • 3 in conversation