Desktop productivity for business analysts and programmers

Order of programs in SAS EG

Reply
Contributor
Posts: 35

Order of programs in SAS EG

I want to run the programs in the order as shown in the process tree, but NP_NPS_CROSS_CONSIDER QYY_Server.sas runs last, even though it is before a lot of programs and then some of the others fail as they depend on it. As you can see in the attachement, it is running last and the code after that has an "X".

How do you change the order of programs in the Process flow? SAS EG drives me crazy sometimes

Grand Advisor
Posts: 17,360

Re: Order of programs in SAS EG

What does the process flow diagram look like?

You can "link" programs to one another to control the flow I believe. Right click on the diagrams and link the files such that they represents your flow order.

This works in EG 5.1

Contributor
Posts: 35

Re: Order of programs in SAS EG

Since I had run the project before, all the programs and the numerous data sets that each program created were in the process flow window, and although it was a pain, I dragged and dropped programs in the process flow window in the order that I wanted.

If there is a more efficient way to do this, I'll appreciate it. Thanks!

Super Contributor
Posts: 356

Re: Order of programs in SAS EG

As (Reeza) said -  is to Link the programs, in the order you want.

Grand Advisor
Posts: 17,360

Re: Order of programs in SAS EG

If I was running this in BASE SAS I'd have one program that called the others using Include statements.

I don't know if that's possible in EG, but worth a try Smiley Happy

Super Contributor
Posts: 307

Re: Order of programs in SAS EG

Linking in Enterprise Guide does not explictly control the order that tasks are performed.

You can explicitly specify the order of tasks by using "ordered lists". From the EG 4.3 Help documentation (sorry about the highlighting):

Creating an ordered list of tasks

You can create a list of tasks and programs in the current project that can be run in the order that you choose. You can select objects from more than one process flow. In this way, you can group objects without changing their positions in process flows or their relationships to other objects. Each ordered list is available from the recently viewed items button at the top left of the workspace and in the project tree. 

To create an ordered list of tasks and programs 

  1. Select File then New Ordered List
  2. In the Ordered List window, click Add to display the tasks and programs that are in the current project.
  3. Select one or more items and click OK to add them to the ordered list
  4. To change the position of an item in the list order, select the item in the Ordered List window and click Up or Down
  5. To remove an item from the list, select the item and click Remove
  6. When the list is complete, click Run to run the tasks and programs in the list, or click Save to save the list. 
Ask a Question
Discussion stats
  • 5 replies
  • 2429 views
  • 0 likes
  • 4 in conversation