SAS Programming Complete; Learn SAS and Become a Data Ninja
4.4 (1,918 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
12,268 students enrolled

SAS Programming Complete; Learn SAS and Become a Data Ninja

SAS Data Step. SQL STEP. Macros. SAS Predictive Analytics.
4.4 (1,918 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
12,268 students enrolled
Created by Ermin Dedic
Last updated 7/2020
English [Auto], Italian [Auto], 1 more
  • Polish [Auto]
Current price: $135.99 Original price: $194.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 11.5 hours on-demand video
  • 30 articles
  • 20 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Assignments
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Discover the data step, the primary way to program in SAS.
  • Discover the proc step, a more specialized kind of processing that is utilized for more particular tasks.
  • Apply SAS SQL, the SAS interpretation of SQL.
  • Learn techniques to decrease the amount of code you have to type, and learn to deal with big data.
  • Grow your skill by getting introduced to the techniques of predictive modelling with SAS.
  • Obtain skills needed to pass SAS Certified Specialist: Base Programming exam.
  • Internet connection

*This course uses a commercial license from WPS. Anyone interested in full information, visit our disclaimer at the bottom. Thank you!*


SAS Programming Complete is perfect for the beginner but also goes into more intermediate topics.

If you are using SAS Enterprise Guide, and you want to learn how to code/program instead of using the point and click interface, this course is ideal! If you are interested in SAS Predictive Analytics, this course has an introduction to the topic.

The first part of the course utilizes the Data step, 2nd part looks at SAS SQL, the third part looks at the Macro Programming/Programs. As an addition, I have added a section on SAS Predictive Modeling using Logistic Regression.  Predictive Modeling is also known as Predictive Analytics.

This course is for beginners but it is comprehensive and covers some advanced topics allowing students who have previous experience to get benefits from it as well. For example, since you get the course for LIFE, you can use it as a resource at any time.

SAS programming is the language of choice of most enterprises/corporations. In 2018, 92% of Fortune 100 companies used SAS. It is the go to for many industries, including banking/finance, insurance, healthcare, pharmaceutical, and automotive.

As mentioned, my SAS training course is developed to to help you become a SAS Certified Specialist: Base Programming. The course also covers some elements of the SAS Certified Professional: Advanced Programming.

I have received numerous private messages from students who have passed these exams, or work-related exams or interviews because of this course. I love reading these messages, especially when students tell me that they couldn't have done it without this course.

The lessons in this course are meant to be taken in order, as each lesson builds up on knowledge, and may mention some important ideas/concepts. If you skip videos, it may appear that some aspects are not being explained. For example, if you skip the import.txt lecture because you only care about importing .csv files, you may miss explanations about certain lines of codes.

Nevertheless, you will learn a lot!

As mentioned, you will learn how to code in the SAS programming language, to help you start a career/gain employment, or move up at your current company. If you're studying SAS at a post-secondary institution, this course can not only help you with school projects but prepare you for a career after you complete your education. 

Please take a look at each section to see what is covered. You are able to view the titles of all lectures, and see a free video preview for some selected lectures.

Learning SAS programming means that you will be able to accomplish the same goal on ANY software that supports SAS language. I personally use WPS. You guys have your own options.

Finally, you have nothing to loseNo risk! You get a 30 day money back guarantee + the course for life (including any new content added after you enroll)!

Enroll now! Your future looks brighter with SAS Training and SAS Certification.


We are not in any way affiliated or associated with SAS Institute. We do not provide, nor do we endorse, a download of SAS University edition for your learning purposes, nor do we personally use SAS software, or SAS logos. We do not link to SAS website, nor do we link to any SAS content, nor do we have screen shots of any of their assets, nor do we distribute it, nor do we suggest it's ours. 

We use a commercial license from WPS. The system I use, WPS, is in no way associated with SAS System. Furthermore, whenever you see the phrases "SAS", "SAS Language" and "language of SAS" used in the course content this refers to the computer programming language. If you see phrases like "program", "SAS program", "SAS language program" used in my course, this is used to refer to programs written in the SAS language. These may also be referred to as "scripts", "SAS scripts" or "SAS language scripts". 

Who this course is for:
  • Users of SAS Enterprise Guide, as being able to code inside of EG is the next natural step and skill to obtain.
  • Individuals that are considering a career, or want to gain employment, with the biggest corporations/enterprises out there!
  • Individuals looking to become a SAS Certified Specialist: Base Programming
  • Those new to SAS syntax and or students looking for a refresher. No prior programming knowledge is required.
Course content
Expand all 154 lectures 11:49:59
+ Introduction
5 lectures 19:38
SAS Enterprise Guide, SAS Studio, WPS ***very important***
How to Find, Install, and Use SAS Studio/SAS OnDemand For Academics
All the Data-sets are attached to this Lecture!
+ Importing
3 lectures 17:03

You will learn how to import a .txt file to SAS. I promise it's super simple!

Preview 02:00

You will learn how to import a .csv file to SAS. I promise it's super simple!

Import .csv

Here I give you a proc import sas example. So far you have seen how to use the data step to import data-sets. In this video I utilize proc import to import a .xlsx file.

Import .XLSX

Quiz for Importing section.

Quiz for Importing
3 questions
+ SAS Syntax, Data Step vs. Proc Step, SAS compared to R/Python
3 lectures 19:03

I compare the data step vs. the proc step.

Data Step vs. Proc Step

I describe what rules to follow to make sure you can communicate with the compiler that makes sense of SAS code.

Preview 07:07

I manually create data with R, Python and SAS to give you an idea about similarities and differences between the 3 popular programming languages.

Preview 08:05
+ Working with Data
20 lectures 01:30:49

Data set options can give you control over your dataset or dataset variables.

Data Set Options

What if your data file is not separated by a blank space? What if it is separated by a dot (.) or |. I'll explain SAS default delimiters, and how to deal with such a problem!

What if your data is separated by a dot or something else? (delimiters)

Sometimes you want to just type your data directly in the syntax. This is logical if you have very little data, and if there is no need to import a file to SAS. I show you how to do it.

Reading data instream in data step (typing data right into coding area)

SAS is not great at dealing with data that has dates, and by default it does not present them properly, I will show you what is required to deal with this.

Reading DATES in data

Here I show you how to create new variables with the current data that you have. Often new variables utilize current variables, so calculations are often required.

Creating Variables/Calculations

More on creating new variables, including the type of expressions that you can utilize.

More on Creating New Variables

Automatic variables do their work in the background but they can be used explicitly as well to perform certain tasks. In this lecture, I look at the _Error_ and _N_ automatic variables.

Automatic Variables

Sometimes you only want certain part of your data set to show up.  I'll show you how this is possible in SAS. If you are in the real estate business, maybe the boss asks you to show him list of only the homes that cost more than 250k.

Filtering Observations (so only some data show up)

Before we start using decision and looping structures in actual SAS code, I thought it was important to first get an intuitive sense of how these structures work. I use some diagrams to enhance learning.

Intuition For If-Then/Else and Do, Do-While, Do-Until

If-then logic lets you subset data and group observations when the observations meet the outlined conditions.

If-then Conditional Logic

You might be more familiar with the for loop but the DO loop is the same exact concept.

DO Iterative Loop and Variations (DO WHILE, DO Until)

There are 4 forms of Do Group Processing, 3 of the forms do not involve a counter/index variable.

More on DO Group Processing (without index/counter variable)

I discuss the WHERE expression in a bit of detail.

More on the WHERE Expression/Statement

Summary of Key Differences between WHERE and IF Conditions to Subset Data Sets


I show you two new statements..proc sort and by statements. This will inform you how to sort your data.

Sorting Observations (PROC SORT and BY statements)

I'll show you how you can merge data from two different .txt files. It is super simple to do in SAS.

Merging Two Data Sets

Did you know that you can use the set statement to merge as well?

Using SET statement to Merge

First, I show you how to use the keep and drop statements in SAS. If you want to reduce your data by keeping or getting rid of certain variables, I'll take you step by step to show you how. Then I show you the rename and label statements that help make your data more "clean". This includes renaming your original variables and labeling those variables.

Data Reduction and Cleaning your Data

You want to make sure to allocate the proper number of bytes for your variables, and in this lecture, I show you how!

LENGTH statement

Creating an enumeration or counting variable is common with survey data!

Creating a Counting (Enumeration) Variable

Quiz for Data section.

Data Section Quiz
7 questions
+ Back to Importing
1 lecture 03:33

This lesson is about importing an SPSS file. Hope you enjoy it.

Importing SPSS file with SAS language
+ Input Types and Informats + User-defined formats
4 lectures 22:27

List input is the most simple form of Input Types but does have some limitations.

List Input

Column Input has some advantages over List Input. I cover what those advantages are!

Column Input

When you have to use Informats to read your data properly..this is referred to as formatted input. 

Formatted Input And Informats

In this lesson, I'm going to show you how to create or define your OWN formats. This is often neccesary, but it does not have to be difficult to understand!

User Defined Formats

Quiz for Informats/Formats and SAS Input Styles.

Informats/Formats and SAS Input Style Quiz
3 questions
+ Arrays
2 lectures 12:03

Recoding variables can be time consuming if you go variable by variable..let me show you an easier way! We utilize the do end loop.

Arrays 1 (Recoding Variables)

Constructing new variables manually is a tedious process when you have many variables that you are working with..let me teach you a simpler way.

Arrays 2 (Constructing new variables)
+ SAS Functions
12 lectures 55:40

I explain SAS Functions. What are they? What can they do? What are arguments?

Preview 09:16

I show you how to use the rand function. This function allows you to produce a sample (random numbers) with a distribution of your choosing.

RAND Function (producing a sample with distribution of your choice)

If you work with large data sets (lots of columns/rows), this lesson will be very useful. Learn about LENGTH, LENGTHC, and LENGTHN functions.

LENGTH, LENGTHN, LENGTHC functions (are you working with a large data set?)

The TRIM function copies your argument(or parameter), and gets rid of trailing blanks(space).

TRIM function (want to get rid of trailing blanks?)

Compress function allows you to remove characters from strings. It also removes leading, trailing, and between blanks.

COMPRESS Function (remove characters from string, and all types of blanks)

If you want to convert your character variable to a numeric one (ie so you can do analysis on that variable), you have to use the INPUT function. If you want to change a numeric variable to a character one, you have to use the PUT function.

Preview 07:42

CATX function will remove both leading and trailing blanks, insert a delimiter (or separator), and return a concatenated (merged) character string.

CATX function

 Do you want to only return the 2nd word (John) from a variable that is storing the concacated full name of an individual ie Fisher, John. Well now you can!

SCAN function
Help Me Understand Your Needs

The Coalesce function will return the first value that is NOT MISSING from a list of numeric arguments. I use an example where you store someone's home phone number and cell #. It's a good example as it is normal to sometimes have home number but no cell # contact, and the other way around. Well, if there is a value to return, ie at least a home number or cell are present, it will return that available number for you.

Coalesce function

The VERIFY function is super useful for data cleaning purposes (ie picking up errors) in a data set. I'll show you one way to use it!

Verify function

I show you how to use the SUBSTR function, both the right application of it (which allows you to extract a substring) and the left application (which is useful for replacing character value contents).

Substr function

A quiz for the Functions section!

Functions Quiz
5 questions
+ Assignments
2 lectures 00:28
Integration Assignments
The assignment will test how well you are able to integrate the skills you have learned. Please see the instruction video for instructions on what you have to do for the assignment, and then check the solutions with the solutions video.
Integration of Skills 1
1 question
Please view the instruction video first. Really important. You can use the attached resource (it's the assignment questions), while you are working on your assignment. Then have a look at the solution video.
Integration of Skills 2
1 question
+ Advanced Techniques - Flexibility and Efficiency
1 lecture 10:43

A flexible way to concatenate a bunch of raw data files vertically.

Flexible Programming 1 - Combining multiple raw data files vertically