Debugging the do loop code
A debug function was developed for data steps in SAS that was particularly helpful for troubleshooting the do
loop code, but it was difficult to use so it was not that popular. Recently, much of this functionality has been built into SAS Enterprise Guide, which is much more usable, especially for debugging do
loop code. Both of these topics will be covered in this section.
Using the original data step debugger
S. David Riba presented his SAS white paper How to Use the Data Step Debugger at the SAS Users Group International 25 in 2000, which benchmarks the time when this capability became widely available to the SAS community (link in the Further reading section). In his white paper, Riba is actually referring to a data step option called /DEBUG
. This option is called at the beginning of the data step on the data
line.
The /DEBUG
option can only be called on a data step. When it is called, it allows the user to interactively step through the execution...