Usage Note 24498: How to control the sequence in which multiple Process Flows are executed in batch when using SAS® Enterprise Guide®
These steps can be used to schedule the attached VBScript, PFD_Order.vbs, which executes process flows (PFD) in the sequence coded in the VBScript instead of the order in which the PFDs appear in the SAS Enterprise Guide project.
For this example, the steps and code reference the PFDs by the names, PFD1, PFD2, and PFD3. However, any PFD names and any number of PFDs can be used as long as the VBScript is modified accordingly.
Note: This example was tested using SAS Enterprise Guide 3.0.2.446.
- Start SAS Enterprise Guide.
- Create a new project.
- Click View Process Flow.
- File New Process Flow (PFD1).
- Add some data and add some tasks or code. When testing, it is best to keep it simple.
- Click File New Process Flow (PFD2).
- Add some data and add some tasks or code.
- Click File New Process Flow (PFD3).
- Add some data and add some tasks or code.
Test the project you just created by executing each PFD.
Make sure to execute the PFDs in the correct order if they include dependant code or tasks. If you used the attached project, PFD_Order.egp, make sure you execute PFD2 first, then execute PFD1, and then execute PFD3.
- Select File Exit. Then click 'Yes' at the prompt 'Save changes to Project?'.
- Choose 'Local Computer' at the prompt 'Save Project To'.
- Change the 'Save in:' location to: C:\Documents and Settings.
- Save the project as PFD_Order.egp.
Now you are ready to create the VBScript file.
- Download the attached zip file.
- Select Start Programs Accessories Notepad.
- Copy and paste the attached VBScript file, PFD_Order.vbs,
into the Notepad window.
- Select File Save As, and change the 'Save in:' location to:
C:\Documents and Settings.
- Save the VBScript as PFD_Order.vbs.
Now you are ready to test the VBScript file.
- Make sure SAS Enterprise Guide is closed.
- Right-click on PFD_Order.vbs and select Open. This executes the VBScript which calls and executes your project file.
- Wait for an appropriate amount of time for the project to execute.
- Open the project to confirm the results were regenerated.
The following steps explain how to use the Windows Scheduler to schedule the VBScript file to execute.
Note: Windows XP was used to test the following steps:
- Access the Windows Control Panel from your client machine.
- Select Scheduled Tasks Add Scheduled Task.
- The Scheduled Task Wizard appears; click Next to continue.
- Click Browse. Select C:\Documents and Settings\PFD_Order.vbs and then click Open.
- Keep the name: PFD_Order.
- For 'Perform this task:', choose 'One time only'; click Next.
- Specify a Start time that is only a few minutes in the future.
- Specify a Start date of the current date; click Next.
- Your network user name should already be filled in.
- Enter your network password, and confirm your password; click Next.
- Click Finish.
- Wait till the scheduled time has passed, and allow for an appropriate
amount of time required to execute your project.
Open the SAS Enterprise Guide project to confirm the process was successful.
Operating System and Release Information
SAS System | SAS Enterprise Guide | Windows | n/a | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Topic: | System Administration ==> Scheduling
|
Date Modified: | 2007-11-30 15:39:37 |
Date Created: | 2006-04-12 10:21:14 |