About This Book
The official guide by the SAS Global Certification Program, SAS Certified Professional Prep Guide: Advanced Programming Using SAS 9.4 prepares you to take the new SAS 9.4 Advanced Programming Performance-Based Exam.
New in this edition is a workbook whose sample scenarios require you to write code to solve problems and answer questions. Answers to the chapter quizzes and solutions to the sample scenarios in the workbook are included. You will also find links to exam objectives, practice exams, and other resources such as the Base SAS Glossary and a list of practice data sets. Major topics include SQL processing, SAS macro language processing, and advanced SAS programming techniques.
All exam topics are covered in the following chapters:
SQL Processing with SAS
- PROC SQL Fundamentals
- Creating and Managing Tables
- Joining Tables Using PROC SQL
- Joining Tables Using Set Operators
- Using Subqueries
- Advanced SQL Techniques
SAS Macro Language Processing
- Creating and Using Macro Variables
- Storing and Processing Text
- Working with Macro Programs
- Advanced Macro Techniques
Advanced SAS Programming Techniques
- Defining and Processing Arrays
- Processing Data Using Hash Objects
- Using SAS Utility Procedures
- Using Advanced Functions
Practice Programming Scenarios (Workbook)
Chapter 1: PROC SQL Fundamentals
PROC SQL Basics
What Is PROC SQL?
SAS data set
table or view
- retrieve data from and manipulate SAS tables
- add or modify data values in a table
- add, modify, or drop columns in a table
- create tables and views
- join multiple tables (when they contain columns with the same name)
- generate reports
PROC SQL Syntax
Syntax, SQL procedure:
PROC SQL <options>;
The PROC SQL SELECT Statement
A Brief Overview
SELECT Statement Syntax
Syntax, SELECT statement:
PROC SQL <options>;
SELECT column-1 <,...column-n>
<GROUP BY clause>
<ORDER BY clause>
- The SELECT clause selects columns.
- The FROM clause selects one or more source tables or views.
- The WHERE clause enables you to filter your data.
- The GROUP BY clause enables you to process data in groups.
- The HAVING clause works with the GROUP BY clause to filter grouped results.
- The ORDER BY clause specifies the order of the rows.
Example: Selecting Columns