Chapter 1. Getting Started with SAS Programming

What You Learn in This Course

Welcome to the SAS Programming 1: Essentials e-course.

In this course, you’ll write SAS programs to access, manage, and analyze your data, and present the results in reports.

1

You’ll read data that resides in SAS data sets, Microsoft Excel spreadsheets, and raw data files. You’ll write programs to create new SAS data sets, and organize the data sets using SAS libraries.

2

You’ll learn techniques for managing data, such as creating, combining and sorting SAS data sets, and for manipulating data.

You’ll also learn how to present your data by creating detail and summary reports. Lastly, you’ll learn to analyze your data and produce frequency and descriptive statistics.

3

Working with Orion Star Data

To learn the concepts in this course, we will be working with data from Orion Star Sports & Outdoors. Orion Star is a fictitious global sports-and-outdoors retailer with traditional stores, an online store, and a large catalogue business.

Orion Star’s corporate headquarters is located in the United States, with offices and stores in many countries throughout the world. Orion Star has about 1,000 employees and 90,000 customers. The company processes about 150,000 orders annually and purchases products from 64 suppliers. Like most organizations, Orion Star has a large amount of data about its customers, suppliers, products, and employees. You work with this data to perform various business tasks throughout this course.

Introduction

In this lesson, you’ll get an overview of SAS software and how you can use SAS to access, manage, analyze, and present your data. In short, you’ll learn some important SAS concepts that lay the foundation for you as a SAS programmer.

Objectives

  • describe SAS capabilities
  • explain the SAS programming process
  • identify the types of files used in SAS

What Is SAS?

SAS is a suite of business solutions and technologies to help organizations solve business problems.

Base SAS is the centerpiece of all SAS software.

It provides a flexible and extensible programming language designed for data access, transformation, and reporting.
To extend the capabilities of Base SAS, you can add other SAS components. For example, you can use a component to access third-party data. Other components give you tools for report writing, high-resolution graphics, statistical analysis, visualization and discovery, and business solutions.

 

4

The SAS Framework

Let’s look at all of these SAS capabilities in a simple framework. No matter what type of business or industry you work in, you need to access your data. You might have data stored in SAS, in a raw data file, in Oracle, in Excel, or in other types of files. Using SAS, you can read any kind of data.

5

Once you access your data, you can manage it. For example, you might need to subset data, create variables, validate and clean data, or combine data to ready it for analysis. SAS gives you excellent data management capabilities.

6

You’ll probably want to analyze your data as well. You can perform some simple analyses, such as finding frequency counts or calculating averages. Or you can run more complex analyses, such as regression or forecasting. For statistical analysis, SAS is the gold standard.

7

Finally, you’ll want to present your data meaningfully. You can create list reports, summary reports, or graphic reports. And you can print these reports, write them to new data files, or publish them on the web. You have lots of options for presenting your data.

8

Exploring the SAS Programming Process

Now that you know a little bit about the power of SAS, let’s take a look at the overall programming process in SAS.

The first step in the programming process is to define the business need. You do this by communicating with the business team or by reviewing a written specification. After you define the business need, you write a SAS program based on the desired output, the necessary input, and the required processing. After you finish coding, you run the program and review your results, which can be reports or notes and messages from SAS regarding your code. As you review the results, you might find inaccuracies or errors, in which case you might need to debug or modify the program. Depending on your results, you might need to repeat some of the steps.

9

Types of Files Used in SAS

As you know, the power of SAS is that you can use it to read any type of data. Let’s take a few moments and learn about the three major file types you’ll use in this course:

  • raw data files,
  • SAS data sets, and
  • SAS program files.

Keeping the overall programming process in mind, let’s see how you use each type of file.

Raw data files contain data that has not been processed by any other computer program. They are text files that contain one record per line, and the record typically contains multiple fields. Raw data files aren’t reports; they are unformatted text.

10

SAS data set. This important type of file is specific to SAS. A SAS data set is your data in a form that SAS can understand. Like raw data files, SAS data sets contain data. But in SAS data sets, the data is created only by SAS and can be read only by SAS.

11

SAS program file. SAS program files contain SAS programming code. These instructions tell SAS how to process your data and what output to create.

12

2 thoughts on “Chapter 1. Getting Started with SAS Programming”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: