The power of the platform

Written By:
Published:
Content Copyright © 2007 Bloor. All Rights Reserved.

Anyone who knows SAS will know that
“leveraging the power of the platform” is one of
SAS’ catchphrases. And anyone who has only become familiar
with SAS since the introduction of SAS 9 (particularly if they are
not directly involved) could be forgiven for thinking that this
slogan refers to the fact that SAS 9 introduced an integrated (at
the metadata level) platform that supports all of the end user
functionality that the company provides.

The truth is that much of the power of
the platform in SAS is contained in what is known as Base SAS. Of
course, pretty much any SAS user from the pre-SAS 9 days will know
what Base SAS is, as will a fair proportion of newer users, but
non-customers won’t and you will still find competitive
salespeople that will denigrate Base SAS, so this article is about
explaining what Base SAS is and how it provides the
“power”.

At its core, Base SAS is a programming
language, But for those of you who are immediately put off by that
let me say that SAS also provides a variety of graphical user
interfaces so that you can use Base SAS without having to be a
programmer. For example, SAS Enterprise Guide (a part of the SAS
9.1 release) provides you (typically business analysts) with a user
friendly interface that allows you to generate Base SAS programs
via a drag-and-drop based interface that hides all the details of
Base SAS so that you don’t need to know about it if you
don’t want to. The interface includes tabs to select, filter
and sort data; it has a built-in debugger and provides reporting
and analytics capabilities. There is also a wizard for creating SAS
stored processes, or “stored services” (which may or
may not be web services) that allow you create composite
applications that are executable across the SAS 9 Platform. SAS
also has other role-based specific interfaces that are provided as
part of its vertical and horizontal solutions and, like SAS
Enterprise Guide, they provide the power of Base SAS in
user-friendly interfaces.

On the other hand, and this is one of
the powerful aspects of Base SAS, you can drop down into it if you
want to. Moreover, since all of SAS’ products ultimately
leverage Base SAS you can do the same thing from them too if
that’s a good idea. Indeed, the ability to drop into Base SAS
is a particular strength of the company’s Data Integration
tool, for example, because you can drop into Base SAS without
leaving the environment rather than having to go out to a C++ or
Java sub-routine, which you might have to in some other
environments.

So, anyway, what’s cool about Base
SAS? Briefly, Base SAS is a 4GL programming language with an
easy-to-learn syntax and hundreds of language elements and
functions. With Base SAS you start with a data step and then
continue with a proc(edure) step. Now, the data step processes data
a row at a time, which means that you can do things with the data
that you can’t easily do with SQL (because SQL is set-based).
However, that doesn’t mean that you can’t use SQL, you
can define a “PROC SQL” subroutine for example, which
is just a bunch of standard SQL statements that you apply to the
data. Alternatively, you can use pre-built SAS Procedures for
standard data manipulation tasks, or use SAS functions (of which
there are a staggering 11,000). You can also write your own
re-usable functions using Base SAS. The out of the box functions
support a variety of things that SQL does not or for which it is
complex to program in SQL. For instance, it is trivial in Base SAS
to switch a row to a column or vice versa, or to reverse a string,
or to take a random sample from a dataset. As another example,
there is built-in support for time series and you can very simply
support complex queries like “tell me all the customers who
bought patio furniture and then bought a barbecue within 3 weeks of
the original purchase”.

This is by no means a comprehensive
review of Base SAS but hopefully you get the idea. This approach
offers significant differentiation from the black boxed approaches
of its competitors. The principle is that whenever you can’t
do something in one of SAS’ front-end tools because you want
to deploy a new graph or analytic or statistical technique or
anything else, then you should always be able to do what you want
by dropping into Base SAS: it really is the power behind the
platform.