Adding a SAS Program to the Process Flow

Create a New SAS Program

To add a new SAS program to a process flow:
  1. Click Add button and select SAS program. A node for the SAS program is added to the process flow.
  2. Select the node and click Open button. (You can also select the node and press Enter.) The code editor appears.
  3. Enter the code for your program.
    Example of a SAS Program on the Code Tab
  4. To name the program, to provide a brief description for the program, and to include any notes, click the Node tab.
    How to Specify Information about the SAS Program
    The SAS program node in the process flow now contains the name and description that you specified on the Node tab.
    The Updated PROC PRINT Node in the Process Flow

Add an Existing SAS Program

You might have already written a SAS program that you want to include in the process flow. To add this program:
  1. In the navigation pane, click the Folders section.
  2. Expand the folders in the Folders section until you find the program that you want to add.
  3. Select the program that you want to add, and then drag it in the process flow. (A green check mark indicates that you can add this file to the process flow.)
    In this example, you are adding the existing TopNCategories.sas file to the process flow in SAS Studio.
    TopNCategories Node in the Process Flow

Add a Snippet

You can use snippets as the starting point for your SAS programs.
To add a snippet to a process flow:
  1. In the navigation pane, select Snippets.
  2. In the Snippets section, select the snippet that you want to add, and then drag it to the process flow.
    In this example, the Import XLSX file snippet is added to the process flow.
    The Import XLSX File Snippet in the Process Flow
  3. To view the code for the snippet, select the snippet node and click Open button. (You can also select the node and press Enter.) Edit the code to meet your needs.
    Here is the code for the Import XLSX file snippet. In this example, specify in the code the location of the XLSX file that you want to import.
    Code in the Import XLSX File Snippet
  4. To name the program that you created, to provide a brief description for the program, and to include any notes, click the Node tab.
    Identification Information for the Import XLSX File Snippet
    The Import XLSX File node in the process flow now includes the description that you provided.
    The Import XLSX File Node in the Process Flow