Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Mastering SAS Programming for Data Warehousing
Mastering SAS Programming for Data Warehousing

Mastering SAS Programming for Data Warehousing: An advanced programming guide to designing and managing Data Warehouses using SAS

eBook
AU$41.99 AU$60.99
Paperback
AU$75.99
Subscription
Free Trial
Renews at AU$24.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $24.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Mastering SAS Programming for Data Warehousing

Chapter 1: Using SAS in a Data Mart, Data Lake, or Data Warehouse

The purpose of this chapter is to showcase how SAS has been used in data warehousing over its lifetime, and how that history impacts SAS data warehousing today. It provides an opportunity to see how slight changes in coding in SAS data steps can greatly impact data input/output (I/O). It also covers how SAS data is managed, and how Base SAS, the analytic component, interacts with stored data.

As SAS developed, there became a need to set indexes on variables, and to use SQL coding in SAS. How PROC SQL in SAS compares with data steps and other SQL programming will be reviewed in this chapter. I will also explain strategies to deal with memory issues in SAS, and how it has evolved to now be used with data in the cloud.

In this chapter, we are going to cover the following main topics:

  • How early versions of SAS handled data

  • Different ways to access data in SAS

  • Considerations in improving I/O in SAS

  • ...

Technical requirements

The dataset used as a demonstration in this chapter, in *.csv format, can be found online on GitHub: https://github.com/PacktPublishing/Mastering-SAS-Programming-for-Data-Warehousing/blob/master/Chapter%201/Datasets/Chap%201_1_Infile.csv.

The code bundle for this chapter is available on GitHub here: https://github.com/PacktPublishing/Mastering-SAS-Programming-for-Data-Warehousing/tree/master/Chapter%201.

Using original versions of SAS

Initially, SAS data had to be input through code into memory whenever analysis code was to be run on the data. This section covers the following:

  • How to enter data into SAS datasets using SAS

  • The early PROCs developed, such as PROC PRINT and PROC MEANS

  • Improvements to data handling made in Base SAS

In this section, you will learn how SAS's data management processes were initially developed. The processes impact how SAS runs today.

Initial SAS data handling

As described on SAS's website (https://www.sas.com/en_us/company-information/profile.html), SAS was invented in 1966 as the Statistical Analysis System, developed under a grant from the United States (US) National Institutes of Health (NIH) to eight universities. The immediate need was to develop a computerized system that could analyze the large amount of agriculture data being collected through the US Department of Agriculture (USDA).

According to the SAS...

Accessing data in SAS

This section covers how accessing data in SAS changed over the years:

  • First, SAS data storage moved from punch cards to mainframes.

  • Next, the invention of personal computers (PCs) led to reconfiguring how SAS data was accessed.

  • Consequently, reading data into SAS from external data files became more common.

In this section, we will discuss how to read data in SAS from an external file, as well as the opportunities and limitations of how SAS processes data.

Upgrading to mainframes

In 1979, Databank of New Zealand adapted SAS to run under IBM's VM/CMS system using IBM's disk operating system (DOS), thus solving the punch card problem and establishing SAS as mainframe software that was remotely hosted. This represented essentially the second rewrite of SAS since its 1976 rewrite. This upgrade made SAS more easily accessible to more customers. It also facilitated the ability for SAS to include more sophisticated components to...

Improving I/O

Although SAS has created many features to improve data warehousing, it is still necessary to improve I/O through the strategic use of SAS code. This section will cover the following:

  • Features for warehousing that have been developed by SAS

  • The importance of using the WHERE rather than the IF clause in data processing

  • How sorting and indexing can be done to improve I/O in SAS

Developing warehouse environments

The 1990s saw people working with SAS and big data to find creative solutions to improve data I/O. In his 1997 SAS white paper (available under Further reading), Ian Robertson describes the benefits of his case study migrating the Wisconsin Department of Transportation Traffic Safety and Record-keeping System (TSRS) from a mainframe SAS setup to one where data was served up to analysts through a local area network (LAN).

By this time, SAS had been reconfigured to run on their LAN's operating system, OS/2, so his team was able to save...

Dealing with storage and memory issues

This section will cover issues with storage and memory when using SAS for big data. It will cover the following:

  • How SAS dealt with competition from structured query language (SQL) for data storage

  • How PROC SQL works and can be used in data warehouse processing

  • Considerations about memory and storage that need to be made when using SAS in a data warehouse in modern times

  • How SAS can work in the cloud

Avoiding memory issues

Even as SAS got more powerful, datasets kept getting bigger, and there were always challenges with running out of memory during processing. For example, using WHERE instead of IF when reading in data would not only reduce CPU usage and the time it took for code to run, it would also prevent unnecessary usage of memory. Even today, tuning SAS code may be necessary to avoid memory issues.

In a data warehouse, mart, or lake, datasets that were transformed in SAS may be stored outside of SAS in SAS...

Using SAS in modern warehousing

Today, SAS data warehousing is more complicated than it was in the past because there are so many options. Learning about these options can help the user envision the possibilities, and design a SAS data warehousing system that is appropriate for their organization's needs. This section will cover the following:

  • A modern case study that used SAS components for analyzing unstructured text in helpdesk tickets

  • A case study of a data SAS warehouse that upgraded an old system to include a new API allowing users more visualization functionality through SAS Visual Analytics

  • A case study of a legacy SAS shop that began to incorporate R into their system

  • A review of how SAS connects with a new cloud storage system, Snowflake

Warehousing unstructured text

In his white paper on warehousing unstructured text in SAS, Nick Evangelopoulos describes how the IT Shared Services (ITSS) division at the University of North Texas (UNT) used...

Summary

This chapter provided a short history of SAS, focusing on how it has been used for data storage and analysis over the years. Initially, SAS data was stored on punch cards. Once data became electronic, the main challenge to SAS users working with big data was I/O. As SAS environments evolved from being on mainframes to being accessible by PCs, SAS developed new products and services to complement its core analytics and data management functions.

SAS data steps are procedural, and allow the programmer opportunities to greatly improve I/O through the use of certain commands, features, and approaches to programming. When SQL became popular, PROC SQL was invented. This allowed SAS users to choose between using data steps or SQL commands when managing data in SAS.

Today, SAS is still used in data warehousing, but there are new challenges with accessing data in the cloud. SAS data warehouses today can include predominantly SAS components, such as SAS VA and CAS. Or, SAS can...

Questions

  1. What is the difference between SAS and SQL with respect to data handling?

  2. What is the difference between subsetting datasets using WHERE compared to the IF clause?

  3. What is the component of SAS that allows it to connect to non-SAS databases?

  4. Under what circumstance should you place an index on a variable in a large dataset?

  5. Should you use SAS to enter a small dataset through data steps? State the reason for your answer.

  6. What is the main advantage of using all SAS components in your warehouse?

  7. What is a good way to decide whether to use a data step or PROC SQL for a particular data editing task?

Further reading

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Understand how to use SAS macros for standardizing extract, transform, and load (ETL) protocols
  • Develop and use data curation files for effective warehouse management
  • Learn how to develop and manage ETL, policies, and print and web reports that meet user needs

Description

SAS is used for various functions in the development and maintenance of data warehouses, thanks to its reputation of being able to handle ’big data’. This book will help you learn the pros and cons of storing data in SAS. As you progress, you’ll understand how to document and design extract-transform-load (ETL) protocols for SAS processes. Later, you’ll focus on how the use of SAS arrays and macros can help standardize ETL. The book will also help you examine approaches for serving up data using SAS and explore how connecting SAS to other systems can enhance the data warehouse user’s experience. By the end of this data management book, you will have a fundamental understanding of the roles SAS can play in a warehouse environment, and be able to choose wisely when designing your data warehousing processes involving SAS.

Who is this book for?

This book is for data architects, managers leading data projects, and programmers or developers using SAS who want to effectively maintain a data lake, data mart, or data warehouse.

What you will learn

  • Develop efficient ways to manage data input/output (I/O) in SAS
  • Create and manage extract, transform, and load (ETL) code in SAS
  • Standardize ETL through macro variables, macros, and arrays
  • Identify data warehouse users and ensure their needs are met
  • Design crosswalk and other variables to serve analyst needs
  • Maintain data curation files to improve communication and management
  • Use the output delivery system (ODS) for print and web reporting
  • Connect other products to SAS to optimize storage and reporting

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 16, 2020
Length: 494 pages
Edition : 1st
Language : English
ISBN-13 : 9781789532371
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $24.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Oct 16, 2020
Length: 494 pages
Edition : 1st
Language : English
ISBN-13 : 9781789532371
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
AU$24.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
AU$249.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts
AU$349.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just AU$5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total AU$ 262.97
Odoo 14 Development Cookbook
AU$110.99
Hands-On SAS for Data Analysis
AU$75.99
Mastering SAS Programming for Data Warehousing
AU$75.99
Total AU$ 262.97 Stars icon
Banner background image

Table of Contents

17 Chapters
Section 1: Managing Data in a SAS Data Warehouse Chevron down icon Chevron up icon
Chapter 1: Using SAS in a Data Mart, Data Lake, or Data Warehouse Chevron down icon Chevron up icon
Chapter 2: Reading Big Data into SAS Chevron down icon Chevron up icon
Chapter 3: Helpful PROCs for Managing Data Chevron down icon Chevron up icon
Chapter 4: Managing ETL in SAS Chevron down icon Chevron up icon
Chapter 5: Managing Data Reporting in SAS Chevron down icon Chevron up icon
Section 2: Using SAS for Extract-Transform-Load (ETL) Protocols in a Data Warehouse Chevron down icon Chevron up icon
Chapter 6: Standardizing Coding Using SAS Arrays Chevron down icon Chevron up icon
Chapter 7: Designing and Developing ETL Code in SAS Chevron down icon Chevron up icon
Chapter 8: Using Macros to Automate ETL in SAS Chevron down icon Chevron up icon
Chapter 9: Debugging and Troubleshooting in SAS Chevron down icon Chevron up icon
Section 3: Using SAS When Serving Warehouse Data to Users Chevron down icon Chevron up icon
Chapter 10: Considering the User Needs of SAS Data Warehouses Chevron down icon Chevron up icon
Chapter 11: Connecting the SAS Data Warehouse to Other Systems Chevron down icon Chevron up icon
Chapter 12: Using the ODS for Visualization in SAS Chevron down icon Chevron up icon
Assessments Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(5 Ratings)
5 star 60%
4 star 20%
3 star 20%
2 star 0%
1 star 0%
Murphy Choy Jun 15, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I believe the book provides a very comprehensive insight into the process of building a data warehouse and how SAS can be used to develop one. Many useful tricks and tips will help folks building their first data warehouse. Highly recommended as a classic reference.
Amazon Verified review Amazon
Roger Nov 06, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book provides background, examples, rationale, and the pros/cons of using SAS in the areas of ETL, data management, policy development, and more. By providing some historical context, Wahi creates a foundation to better understand the development and application of certain SAS statements over time. She explains multiple ways of how to perform a task while providing examples of code, log, and output. She provides detailed explanations of code, provides data to support one method over another, and explains the pros and cons of each method. Through the plethora of examples, she points out the nuances in the various data file types, code, and logs, and she addresses naming tips for data and code along the way. Not only does the book’s coding examples and explanations provide a methodology for data management, but she also discusses important considerations and rationale in setting up policy regarding data management.The reader should probably have some basic foundation in SAS or be currently learning it. The book is written for both active and passive learning. She provides data and code to practice while reading; however, the code, logs, and output are in the book which allows one to follow along and see and compare the results without doing the hands-on component. Although some of the deeper computer language might be over the head of a novice, it provides brief snippets of detail for the more experienced SAS programmer while not losing the interest of those less experienced. Additionally, even with little knowledge of data management or ETL, this book is extremely beneficial in truly understanding the benefits and limitations of various statements and in having examples well-explained, thereby, serving as references. Additionally, each chapter is enhanced with a brief chapter outline in the beginning and ends with a summary and questions to challenge the reader with application-level questions.
Amazon Verified review Amazon
Gracie Nov 19, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have followed Dr. Wahi’s teachings for over two years. I still use some of her codes for my healthcare data analysis in SAS. When I came across a book, I knew it would be a wonderful book. This book covers practical SAS programming. The book starts with good explanations of the concepts of big data, important terminologies. Then it reviews the basic SAS programming and its essential functions for data managing such as importing and exporting data, exploratory data analysis, data visualization. Next, it enters to more advanced topics SQL and macros, and ETL. The explanations are filled with essential concepts, practical examples, and questions.Monika Wahi has converted a difficult subject into something that is enjoyable to read. The authors do a fine job of explaining each process, when to use it, and how to interpret the results. Their examples are easy to understand, and the tips they provide are helpful.
Amazon Verified review Amazon
Alexandre Santos Guedes Oct 30, 2020
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
First, I have to say that I'm an R Language learner and I haven't used SAS before. I was worried about it because I don't have access to the SAS server paid edition. However, the book already starts explaining to the reader where to find a free edition of the SAS server. It is a plus for the book.It also brings many examples and exercises that guide the readers to improve their SAS skills.I suggest improvements to the layout of the images, tables, and graphs for the next editions.In conclusion, I recommend the book.
Amazon Verified review Amazon
Anandaroop Jan 29, 2021
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
The so called "new" book had a crease on the coverpage
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.