Learn SAS online for free in 20 days

Teachinfinity.com SAS tutorial

Introduction to SAS and analytics

Analytics is one of the fastest growing field which provides better and meaningful insights on data by performing statistical analysis, data mining and forecasting. And finally using it for business intelligence effectively. In past few years we have witnessed a huge spike in rate of data generation through every smart device (Automation devices controlled via micro-controller or computer) and websites are collecting tons of users preferences and demographic data, The application most noteworthy of all is to process and manipulate huge data, Analytics find its application.

Among various tools available for analytics SAS, SPSS, R and Python are popular in industry.
This series is to cover SAS in exhaustive way through hands on.

Learn SAS online for free

Lets get started :

SAS (pronounced as sass) stands for Statistical Analysis System was  developed at North Carolina State University from 1966 until 1976.
You can use SAS in any environment \ platform like windows, linux, MAC etc. ALso, SAS provides awesome resources to access and learn SAS online.
To get free access to powerful SAS software you can visit this link :

Free SAS on Demand

you need to create account and you are good to go. SAS programs are portable you can choose any platform, i am using linux and using online Free SAS on Demand.

First screen of SAS on demand (Once you have created an account and activated it ) :
SAS Studio


SAS program is a set of statements which are executed and it follows a proper semantics. There are some rules in SAS which need to kept in mind while writing the SAS programs :


Rule 1. Like other popular programming languages, every statement in SAS ends with semicolon ‘;’.

Rule 2 :  The statements written in SAS are case insensitive (upper and lower both are same) and we can club statements in a single line if required which is the case when we take input from file (I’ll cover this in detail later)

Rule 3 : To make your SAS program more readable, it is recommended to include comments which you can declare using (*) for single line comment or ‘/*’    <your comment here > ‘*/’ for multi-line comments.

Comments SAS


SAS can analyse data in special form (called as datasets) if you’re exporting it from external data source it is preferred to have it converted to SAS readable datasets.


See example of SAS dataset :

The dataset constitutes of column and rows (similar to table in SQL )

Lets write our first SAS program :

To create a dataset which contains two columns (name and marks ) and having two records in it.


Typical SAS log which give us information about warnings, errors , processing and execution of SAS program :

This is the output of SAS program :


More about SAS dataset :

SAS dataset is also called as table (Same naming convention is used in SQL), the columns are called as variables and rows are called as observations.