About This Book

Audience

SAS Studio: Writing Your First Custom Task is intended for developers who need to create custom tasks. The purpose of this book is to show you how to convert an existing SAS program to a SAS Studio task. The benefit of using a SAS Studio task is that you can share this point-and-click interface with other SAS Studio users. Other users do not need to understand SAS programming to run the task. They simply enter the parameter values and run the task to get their output.

Prerequisites

Requirements

To complete the examples in this document, you must have access to SAS Studio 3.4 or later. This document assumes you are running SAS Studio 3.5.

Create the Example Data Set

To follow the steps in this document, you should create a SAS data set called Character.
To create this data set:
  1. Open SAS Studio. In the banner, click Options Icon and select New SAS Program. An empty Program tab opens in the SAS Studio workspace.
  2. Enter this code on the Program tab:
    data work.character;
       input Name $ Age $ Enroll_Date $10.;
    datalines;
    Mark 10 15/03/2015
    Susan 8 01/08/2015
    Jessie 7 20/12/2014
    run;
    Note: This data set is saved in the Work library, which exists only for the SAS Studio session. If you start a new SAS Studio session, you need to re-create this data set.
  3. Click Run Icon.
The Work.Character data set opens on the OUTPUT DATA tab.
Contents of Work.Character Data Set
To view the properties for an individual variable, select the variable name from the Columns pane. If you select the Age variable, the properties pane shows that Age is a character variable.
Age As a Character Type Variable
If you select the Enroll_Date variable, the properties pane shows that Enroll_Date is a character variable with a length of 10.
Enroll_Date As a Character Variable with a Length of 10
When you are finished, close the Program tab.