Chapter 9: Debugging and Troubleshooting in SAS
This chapter will provide guidance for debugging and troubleshooting code in SAS. Because much of the code in a data warehouse focuses on extract, transfer, and load (ETL) protocols, we will focus on debugging and troubleshooting data step code. First, we will discuss general strategies for developing, maintaining, and managing data step code and practice troubleshooting when something goes wrong. Next, we will examine ways of debugging the do
loop code using SAS debug functions. Finally, we will cover how to prevent errors in SAS macros, and ways to troubleshoot if errors are identified.
We will go over the following practical approaches:
Considering the placement of the
RUN
command in data step code, and strategically developing long data step codeForming code in both data steps and macros that facilitates finding and closing
%DO
loopsImplementing a step-by-step approach to developing finalized ETL macros, and storing...