business planning, forecasting, and decision support
operations research and project management
quality improvement
applications development
With Base SAS software as the foundation, you can integrate with SAS many SAS
business solutions that enable you to perform large scale business functions. Examples
include data warehousing and data mining, human resources management and decision
support, and financial management and decision support.
Overview of Base SAS Software
The core of the SAS System is Base SAS software, which consists of the following:
DATA step
a programming language that you use to manipulate and manage your data.
SAS procedures
software tools for data analysis and reporting.
macro facility
a tool for extending and customizing SAS software programs and for reducing text in
your programs.
DATA step debugger
a programming tool that helps you find logic problems in DATA step programs.
Output Delivery System (ODS)
a system that delivers output in a variety of easy-to-access formats, such as SAS data
sets, procedure output files, or Hypertext Markup Language (HTML).
SAS windowing environment
an interactive, graphical user interface that enables you to easily run and test your
SAS programs.
This document covers only the SAS language concepts. For a complete guide to Base
SAS software functionality, also see these documents: SAS Output Delivery System:
Users Guide, SAS National Language Support (NLS): Reference Guide, Base SAS
Procedures Guide, SAS XML LIBNAME Engine: Users Guide, SAS Macro Language:
Reference, SAS Logging: Configuration and Programming Reference, and the Getting
Started with SAS online tutorial. The SAS windowing environment is described in the
online Help.
Components of the SAS Language
SAS Files
When you work with SAS, you use files that are created and maintained by SAS, as well
as files that are created and maintained by your operating environment, and that are not
related to SAS. Files with formats or structures known to SAS are referred to as SAS
files. All SAS files reside in a SAS library.
4 Chapter 1 Essential Concepts of Base SAS Software
The most commonly used SAS file is a SAS data set. A SAS data set is structured in a
format that SAS can process. Another common type of SAS file is a SAS catalog. Many
different types of information that are used in a SAS job are stored in SAS catalogs.
Examples include instructions for reading and printing data values, or function key
settings that you use in the SAS windowing environment. A SAS stored program is a
type of SAS file that contains compiled code that you create and save for repeated use.
Operating Environment Information
In some operating environments, a SAS library is a physical relationship among
files; in others, it is a logical relationship. For more information about the
characteristics of SAS libraries, see the SAS documentation for your operating
environment: “Introduction to SAS Files, Libraries, and Engines in UNIX
Environments” in SAS Companion for UNIX Environments, “Introduction to SAS
Files” in SAS Companion for Windows, and “Using SAS Libraries” in SAS
Companion for z/OS.
SAS Data Sets
There are two types of SAS data sets:
SAS data file
SAS view
A SAS data file both describes and physically stores your data values. A SAS view, on
the other hand, does not actually store values. Instead, it is a query that creates a logical
SAS data set that you can use as if it were a single SAS data set. It enables you to look at
data stored in one or more SAS data sets or in other vendors' software files. SAS views
enable you to create logical SAS data sets without using the storage space required by
SAS data files.
A SAS data set consists of the following:
descriptor information
data values
The descriptor information describes the contents of the SAS data set to SAS. The data
values are data that has been collected or calculated. They are organized into rows,
called observations, and columns, called variables. An observation is a collection of data
values that usually relate to a single object. A variable is the set of data values that
describe a given characteristic. The following figure represents a SAS data set.
Components of the SAS Language 5
Figure 1.1 Representation of a SAS Data Set
descriptor
portion
variables
ID NAME TEAM STRTWGHT ENDWGHT
data
values
observation
1 0 2 3
1 0 4 9
1 2 1 9
1 2 4 6
1 0 7 8
Da v i d S h a w
Ame l i a S e r r a n o
Al a n Na n c e
Ra v i S i n h a
As h l e y Mc Kni g h t
r e d
y e l l o w
r e d
y e l l o w
r e d
1 8 9
1 4 5
2 1 0
1 9 4
1 2 7
1 6 5
1 2 4
1 9 2
1 7 7
1 1 8
1
2
3
4
5
descriptive information
Usually, an observation is the data that is associated with an entity such as an inventory
item, a regional sales office, a client, or a patient in a medical clinic. Variables are
characteristics of these entities, such as sale price, number in stock, and originating
vendor. When data values are incomplete, SAS uses a missing value to represent a
missing variable within an observation.
External Files
Data files that you use to read and write data, but which are in a structure unknown to
SAS, are called external files. External files can be used for storing
raw data that you want to read into a SAS data file
SAS program statements
procedure output
Operating Environment Information
For more information about the characteristics of external files in your operating
environment, see the SAS documentation for your operating environment: “Using
External Files and Devices” in SAS Companion for UNIX Environments, “Using
External Files under Windows” in SAS Companion for Windows, and “Assigning
External Files” in SAS Companion for z/OS.
Database Management System Files
SAS software is able to read and write data to and from other vendors' software, such as
many common database management system (DBMS) files. In addition to Base SAS
software, you must license the SAS/ACCESS software for your DBMS and operating
environment.
SAS Language Elements
The SAS language consists of statements, expressions, options, formats, and functions
similar to those of many other programming languages. In SAS, you use these elements
within one of two groups of SAS statements:
DATA steps
6 Chapter 1 Essential Concepts of Base SAS Software
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.179.85