BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
OscarBoots1
Quartz | Level 8

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

1 ACCEPTED SOLUTION

Accepted Solutions
DanielSantos
Barite | Level 11

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

5 REPLIES 5
ankit___gupta
Quartz | Level 8

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.

OscarBoots1
Quartz | Level 8

Thanks ankit_gupta,

 

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

 

Appreciate your post though! 

DanielSantos
Barite | Level 11

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

 

 

OscarBoots1
Quartz | Level 8

Hi 

 

 

 

 

OscarBoots1
Quartz | Level 8

Thanks Daniel,

 

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

 

Thanks !

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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