PROC steps
A DATA step consists of a group of statements in the SAS language that can perform the
following tasks:
read data from external files
write data to external files
read SAS data sets and SAS views
create SAS data sets and SAS views
Once your data is accessible as a SAS data set, you can analyze the data and write
reports by using a set of tools known as SAS procedures.
A group of procedure statements is called a PROC step. SAS procedures analyze data in
SAS data sets to produce statistics, tables, reports, charts, and plots, to create SQL
queries, and to perform other analyses and operations on your data. They also provide
ways to manage and print SAS files.
You can also use global SAS statements and options outside of a DATA step or PROC
step.
SAS Macro Facility
Base SAS software includes the SAS Macro Facility, a powerful programming tool for
extending and customizing your SAS programs, and for reducing the amount of code
that you must enter to do common tasks. Macros are SAS files that contain compiled
macro program statements and stored text. You can use macros to automatically generate
SAS statements and commands, write messages to the SAS log, accept input, or create
and change the values of macro variables. For complete documentation, see SAS Macro
Language: Reference.
Ways to Run Your SAS Session
Starting a SAS Session
You start a SAS session with the SAS command, which follows the rules for other
commands in your operating environment. In some operating environments, you include
the SAS command in a file of system commands or control statements. In other
operating environments, you enter the SAS command at a system prompt or select SAS
from a menu.
Different Types of SAS Sessions
You can run SAS in any of several ways that might be available for your operating
environment:
SAS windowing environment
interactive line mode
noninteractive mode
batch (or background) mode
Ways to Run Your SAS Session 7
In addition, SAS/ASSIST software provides a menu-driven system for creating and
running your SAS programs.
SAS Windowing Environment
In the SAS windowing environment, you can edit and execute programming statements,
display the SAS log, procedure output, and online Help, and more. The following figure
shows the SAS windowing environment.
Figure 1.2 SAS Windowing Environment
In the Explorer window, you can view and manage your SAS files, which are stored in
libraries, and create shortcuts to external files. The Results window helps you navigate
and manage output from SAS programs that you submit; you can view, save, and
manage individual output items. You use the Program Editor, Log, and Output windows
to enter, edit, and submit SAS programs, view messages about your SAS session and
programs that you submit, and browse output from programs that you submit. For more
detailed information about the SAS windowing environment, see Chapter 16,
“Introduction to the SAS Windowing Environment,” on page 357.
Interactive Line Mode
In interactive line mode, you enter program statements in sequence in response to
prompts from the SAS System. DATA and PROC steps execute when one or more of the
following happens:
a RUN, QUIT, or a semicolon on a line by itself after lines of data are entered
another DATA or PROC statement is entered
the ENDSAS statement is encountered
By default, the SAS log and output are displayed immediately following the program
statements.
8 Chapter 1 Essential Concepts of Base SAS Software

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.