Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

Grid Enabling SAS Programs

Introduction

This document outlines how to grid enable a SAS program. It also makes recommendations for when to do so, as well as the advantages.

What is a Grid Enabled SAS Program?

A grid enabled SAS program is a program which has been analysed to run on a SAS Grid platform. When a program is analysed for grid, SAS detects whether the SAS program is suitable for execution across the grid (executing in multiple sessions or jobs).

Once a program is analysed, grid related setup macros and code are inserted into the program. These bits of code include instructions on to split the program, so it gets executed across different SAS sessions within the grid. This program can then be saved and added to the project. When run, a successfully grid enabled program will execute multiple separate processes, distributed across the grid simultaneously (multi-threading). This has the advantage of reducing the overall run time.

When is it Appropriate to Grid Enable a SAS Program?

SAS programs that contain numerous steps and execute over a long duration are likely to benefit the most from Grid Enabling SAS jobs. This is likely to be when:

  • When data are read from more than one input table with multiple steps;
  • When data are written to multiple output tables with multiple steps; 
  • When macro language is used to generate multiple steps.

The SAS program should be “stable”, i.e. you rarely modify the contents of the program, or are happy to repeat the Grid enabling steps each time the program is modified

Steps to Grid Enable a SAS Program

SAS Enterprise Guide allows SAS Programs to be analysed for Grid Computing. The steps we should perform is as follows:

  • Finalise the user written code;
  • When finalised and tested, select “Analyze Program” and then “Analyze for Grid Computing” as shown below:

Grid Enabling SAS Programs Image 1

This will launch the “Analyze SAS Program for Grid Computing” window as shown below:

Grid Enabling SAS Programs Image 2

  • Select the “Grid” radio button
  • Press the “Begin analysis” button. This may request our program is executed!
  • Enter a new name for the Grid Enabled copy of our original program; for example suffix _Grid onto the name.
  • Press “Add to project” (this will be enabled after begin analysis) and then finish by pressing "Close".
  • This will leave the Process flow with the original and the Grid enabled copies of our programs; similarly to the following:

Grid Enabling SAS Programs Image 3

Grid Enabling SAS Programs Image 7

As can be seen, the grid analyser inserts additional statements and comments into our program which, if suitable, enables SAS to run the program across the grid platform.

It is recommended that a copy of the original program is retained.