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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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