Understanding Process Flows

What Is a Process Flow?

You must be working in the Visual Programming perspective to work with process flows. For more information about the Visual Programming perspective, see Understanding Perspectives.
A process flow consists of one or more objects. Each object is represented by a node in the process flow. The process flow shows the relationship between two or more objects, such as a SAS program, a task, a query, and so on.
This sample process flow contains three branches.
  • In the first branch, a query is created for the Sashelp.Classfit data set. As a result of this query, only observations where Sex=M are included in the output data set (called Webwork.Query). The Rank Data task ranks the Height and Weight values by Age.
  • In the second branch, you write a SAS program that generates an output data set. After this program runs, a subflow that contains more program and task nodes runs. Then finally, SAS Studio tries to run the Bar Chart node. However, this task generates a warning.
  • In the third branch, the SAS program generates an error. The information for the Table Attributes node is incomplete. SAS Studio cannot run the process flow until you provide the required data.
Example of a Simple Process Flow

Creating Process Flows

In SAS Studio, you can have multiple process flows. These process flows run independently of each other. To create a new process flow, click New Options Icon and select New Process Flow. A new Process Flow tab appears in the interface.

What Are Ports?

In a process flow, you can have two types of ports:
control ports
In the process flow, these types of ports appear as Control Port Icon. You use these ports to specify the order in which nodes run in the process flow. For more information, see Linking Nodes in a Process Flow.
data ports
In the process flow, these types of ports appear as Data Port Icon.
When you run a task, you must specify an input data source. You specify the input data source in the task interface. From the process flow, you can determine the name of the input data source by positioning your mouse pointer over the input data port. To view the data source on a separate tab, double-click the data port icon.
In this example, the input data source for the Sort Data task is SASHELP.CLASSFIT.
Viewing the Input Data Port for the Sort Data Node
Tasks from the Data category, such as the Sort Data task, have an output data source as well as an input data source. You can use the output data port to determine the name of the output data source. To view the data source on a separate tab, double-click the data port icon.
In this example, the output data source for the Sort Data task is WORK.SORT.
Viewing the Output Data Port for the Sort Data Node
By default, ports are displayed in the process flow. To turn off the ports, click Show Ports.

Understanding the Status of Each Node

When you run a process flow, some nodes might run successfully, and others might not. To see the status of each node, how long it took to run the node, and whether any output data was created, click the Results tab.
Here are the contents of the Results tab for the previous process flow.
Results Tab for Process Flow Example
You can use these icons to determine the status of each node in the process flow:
Icon
Description
Incomplete
specifies that more information is needed before SAS Studio can run the node. For example, if you see this icon on a task node, you must specify values for the required options in the task. This icon can also appear on an empty subflow node after SAS Studio tries to run it.
Node in the Queue to Run
specifies that the node is in the queue to run.
Green Check Mark
specifies that the code for the node was submitted.
Warning Icon
specifies that the code for the node generated a warning. Review the log for that node for more information.
Error Icon
specifies that the code for the node generated an error. Review the log for that node for more information.

Customizing a Process Flow

You can customize your process flow in these ways.
  • To specify a color for a node or a group of nodes, select the nodes and click Color. From the drop-down list, select the color that you want to use.
  • By default, you can arrange objects in the process flow any way you like. However, your process flow might become confusing if it contains many objects. Click Arrange button for SAS Studio to arrange the objects in your process flow. When arranging the nodes, SAS Studio considers any dependencies and the order in which the nodes were added to the process flow.

Viewing the Properties of a Process Flow

To view the properties of the current process flow, click the Properties tab. From the properties, you can specify the priority of execution of the nodes. The process flow runs the nodes in the order in which the nodes are added to the process flow. If node 1 is dependent on another node 2, node 2 must run completely before node 1 will run. You can also choose to run the nodes in parallel, which means that multiple workspace servers are used to run the nodes. As a result, the nodes do not share a common Work library, so SAS Studio saves any generated output to the Webwork library.