0% found this document useful (0 votes)
198 views

SAS Training - Day1

SAS Day 1

Uploaded by

Rakesh Rajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
198 views

SAS Training - Day1

SAS Day 1

Uploaded by

Rakesh Rajan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 36

Module 1

SAS
Chapter 1: Installation of SAS

By: Algae Services


Author: <Saravanan Palanivel>
Email: [email protected]
Course: http://tutorials.algaeservice.com/
http://tutorials.algaeservice.com/ 1 www.algaeservices.co.in
 Chapter 1: Getting Started Using SAS Software
The SAS Language
SAS Data Sets
The Two Parts of a SAS Program
The DATA Step’s Built-in Loop
Choosing a Mode for Submitting SAS Programs
Submitting a Program in the SAS Windowing Environment
Viewing Your Results in the Output Window
Creating HTML Output
SAS Data Libraries
Viewing Data Sets with SAS Explorer Using SAS System Options

http://tutorials.algaeservice.com/ 2
About Us

Author: Algae Services


Have Decade of experience in Corporate Training, Classroom
sessions in different streams of Technology.
• Expertise in Big Data technologies , ERP, Re-Engineering,
Database Technologies, Data modeling.
• Worked with top service and product companies like
Wipro , Volvo , TVS , TEG ANALYTICS, General Electrics ,
Royal Bank of Scotland , Verizon etc.
• Worked with Universities like Jain University , RGTU,
Praxis, IMS Pro School.
http://tutorials.algaeservice.com/ 3 www.algaeservices.co.in
Agenda

History of SAS
Installation of SAS
Working Principles
of SAS Program
SAS Processing
Sample program
Summary
Questions

http://tutorials.algaeservice.com/ www.algaeservices.co.in
History of SAS

• SAS began at North Carolina State


University as a project to analyze
agricultural research. As demand for
such software grew, SAS was founded in
1976.
• SAS is used at more than 50,000 sites in
over 127 countries, including 93 of the
top 100 companies on the 2011 Fortune
Global 500® list.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Statistical Analysis Software (SAS)

• An integrated system that enables us to perform


– Data entry, retrieval and management
– Report writing and graphics
– Statistical and Mathematical Analysis
– Business planning, forecasting and DS
– Quality, OR and project management
– Application Development
– Business Intelligence and Data Warehousing(BIDW)

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Why SAS?

• Platform Independence
• Portability
• Data Access from diverse sources
• Powerful Tools for various Business needs
• Data warehousing Made Easy
• Single integrated system

http://tutorials.algaeservice.com/ www.algaeservices.co.in
SAS System Architecture

--- -- -- -- ---- --- --- --- ---

-Raw File -
--- ----------- - - - - - - - - -
- - - - - - - --- -- - - - - - - - -
Graphs

SAS Drill
RDBMS
Down
Reports

ERP/Legacy

Files

http://tutorials.algaeservice.com/ www.algaeservices.co.in
SAS Usage – Solution Wise
• Analytics
• Business Analytics
• Business Intelligence
• Customer Intelligence
• Data Management
• Fraud & Financial Crimes
• IT Management
• OnDemand Solutions
• Performance Management
• Risk Management
• SAS® 9.4
• Supply Chain Intelligence
• Sustainability Management
http://tutorials.algaeservice.com/ www.algaeservices.co.in
SAS Usage – Industry Wise
• Casinos
• Communications
• Education
• Financial Services
• Government
• Health Insurance
• Health Care Providers
• Hotels
• Insurance
• Life Sciences
• Manufacturing
• Media
• Oil & Gas
• Retail
• Travel & Transportation
• Utilities
• Small to Midsize Business

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Base SAS

• Data access
• Management
• Analysis
• Presentation

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Example

• With SAS, we can join Oracle data on a mainframe


computer with an existing SAS data set, create new
variables (columns), and produce an interactive graph on
PC.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Managing Data

• After we have accessed relevant data, we can use the


SAS programming language to manipulate it any way
we choose.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
For Example:
We can do the following, like

• Format the data

• Create variables (columns)

• Use operators to evaluate data values

• Use functions to create and recode data values

• Subset data

• Perform conditional processing

• Merge a wide range of data sources

• Create, retrieve and update database information

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Analyzing Data and Presenting Information

• Once our data is in shape, we can use SAS to analyze data


and produce reports. Our SAS output can range from a
simple listing of a data set to customized reports of complex
relationships.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Analysis
• Base SAS provides powerful data analysis tools.

For example, we can


– Produce tables, frequency counts, and cross-tabulation tables

– Create a variety of charts and plots

– Compute a variety of descriptive statistics, including the mean, sum, variance, standard deviation and
more

– Compute correlations and other measures of association, as well as multi-way cross-tabulations and
inferential statistics.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Presentation

• For reporting and displaying analytical results, SAS gives us an


almost limitless number of visually appealing output formats, such
as
– An array of markup languages including HTML and XML
– Output that is formatted for a high-resolution printer, such PDFs
and RTF
– Color graphs that you can make interactive using ActiveX
controls or Java applets.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Explore the SAS Workspace

• SAS is designed to be easy to use. It provides windows


for accomplishing all the basic SAS tasks we need to
do.
• When we first start SAS, the five main SAS windows
open:
The Explorer, Results, Program Editor or Editor, Log,
and Output windows.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
SAS Windowing Environment
When you first start SAS, the five main SAS windows open: the
Explorer, Results, Program Editor or Editor, Log, and Output
windows.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
View of Explorer Window
 In the Explorer window, we can view and manage our SAS files and create shortcuts to files
that are not formatted by SAS. Use this window to
 Create new SAS libraries and SAS files
 Open any SAS file
 Perform most file management tasks such as moving, copying, and deleting files
 Create file shortcuts.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
View of Editor Window
• We can use the window to enter, edit and submit SAS programs:

http://tutorials.algaeservice.com/ www.algaeservices.co.in
View of Log Window

• The Log window displays messages about our SAS


session and any SAS programs that we submit.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
View of Output Window

• The Output window displays the output from SAS programs


that we submit. It automatically opens or moves to the
front of our display when we create output.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
View of Output Window – HTML Format

• If we create HTML output, we can view it in the Results


Viewer window, which is the internal browser for SAS.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
View of Result Window
• The Results window helps us to navigate and manage output from SAS
programs that we submit. We can view, save, and print individual items of
output.
• The Results window is empty until we submit a SAS program that creates
output. Then it opens or moves to the front of our display.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Working with SAS Data sets
Before we can work with our data in SAS, it must be in a special form called a SAS
data set. Conceptually, a SAS data set (also called a table) is a file containing
descriptor information and related data values. The file is organized as a table of
observations (rows) and variables (columns) that SAS can process. Some SAS
data sets also contain an index, which enables SAS to locate records in the
data set.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Descriptor Portion

• Descriptor Portion
– Name of the data set
– Date and time the data set was created
– Number of observations
– Number of variables.
– Each variable's name, type, length, format, informat,
and label.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Data Portion

• Data Portion
– Tabular Arrangement of data
– Contains Observations and Variables
– Variables can be either Character or numeric
– Character variables can be up to 32K long
– Numeric Values stored as floating point variables have
a default length of 8 bytes
– SAS can handle up to 32,767 variables
http://tutorials.algaeservice.com/ www.algaeservices.co.in
Contd..

To work with SAS data sets, you also need to understand how they
are stored. All SAS files are stored in a SAS library, which is a
collection of files
such as SAS data sets and catalogs. In the Windows and Unix
environments, a
SAS library is typically a group of SAS files in the same folder or
directory.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Library and Data Sets

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Layout of SAS Programs

• SAS Programs used to access, analyze, manage and present


data
• SAS Statements
– Case insensitive
– Free Format
– Ends with a semicolon
• Styles for Comment - *statement; or /* …*/

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Part of SAS Programs
• Data Step
• TO CREATE DATA SETS
– Put your data into a SAS data set
– Compute the values for new variables
– Check for and correct errors in your data
– Produce new SAS data sets by subsetting, merging, and updating existing data sets.

• Proc Step
• PROCESS DATA SETS
– Print a report
– Produce descriptive statistics
– Create a tabular report
– Produce plots and charts.

http://tutorials.algaeservice.com/ www.algaeservices.co.in
SAS Variables and File Names
• NAMES
– 1 TO 32 CHARACTERS IN LENGTH
– START WITH LETTER (A THRU Z) AND _
– CAN BE A COMBINATION OF NUMBERS/LETTERS
– Blanks cannot appear in SAS names.
• VARIABLES
– CHARACTER
– NUMERIC
• FILENAMES
– 2 LEVEL
– LIB - WORK/PERMANENT
• Example:-
– Payroll
– Budget1995_1997
– _Students

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Processing SAS Programs

• When we submit a SAS program, SAS software reads the


statements and checks them for errors.
• When it encounters a DATA, PROC, or RUN statement, SAS
software stops reading statements and executes the current
step in the program. In our sample program, each step ends
with a RUN statement.
• Example:-
Data Libname.New_dsname;
Set Libname.Old_dsname;
run;
http://tutorials.algaeservice.com/ www.algaeservices.co.in
• Questions

http://tutorials.algaeservice.com/ www.algaeservices.co.in
Contact Us

– Thanks
– Algae Services
– www.algaeservices.co.in
– http://tutorials.algaeservice.com/
– BTM Bangalore

http://tutorials.algaeservice.com/ www.algaeservices.co.in

You might also like