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
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
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.
Thanks ankit_gupta,
I'm not actually exporting any results, I just need to run 'a part' of the Project.
Appreciate your post though!
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
Hi DanielSantos,
This sounds like a solution but I won't get to check it out until next week.
Appreciate your response!
I'll let you know how I go.
Cheers
Thanks Daniel,
Getting the actual code with the 'Container' part really made it easy for me.
Thanks !
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!
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.
Ready to level-up your skills? Choose your own adventure.