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

Arrow left icon
Profile Icon Monika Wahi
Arrow right icon
NZ$14.99 NZ$64.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (5 Ratings)
eBook Oct 2020 494 pages 1st Edition
eBook
NZ$14.99 NZ$64.99
Paperback
NZ$80.99
Subscription
Free Trial
Arrow left icon
Profile Icon Monika Wahi
Arrow right icon
NZ$14.99 NZ$64.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (5 Ratings)
eBook Oct 2020 494 pages 1st Edition
eBook
NZ$14.99 NZ$64.99
Paperback
NZ$80.99
Subscription
Free Trial
eBook
NZ$14.99 NZ$64.99
Paperback
NZ$80.99
Subscription
Free Trial

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

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 : 9781789531183
Category :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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 NZ$7 each
Feature tick icon Exclusive print discounts
$279.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 NZ$7 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total NZ$ 278.97
Odoo 14 Development Cookbook
NZ$116.99
Hands-On SAS for Data Analysis
NZ$80.99
Mastering SAS Programming for Data Warehousing
NZ$80.99
Total NZ$ 278.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

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.