Interview Questions   Tutorials   Discussions   Programs   Videos   

SAS - What is debugging? How to test the debugging in SAS?

asked mar September 20, 2014 06:29 AM  

What is debugging? How to test the debugging in SAS?


1 Answers

answered By vishnoiprem   0  

To debug a SAS program that produces no syntax errors, follow these six steps:

  1. Check to see that your original data input is correct for all variables.
  2. If the data is input to SAS correctly, go to the other end of the program. Select a variable or a small set of variables involved in the analyses where you get the wrong results. Use PROC FREQ, PROC MEANS, and/or PROC PRINT to examine these variables. There should be a problem with at least one; identify exactly how these variables are incorrect.
  3. Now follow these variables back through each operation you performed, always looking at the characteristics in question. In this way you can narrow down the exact step where an error occurs. Prior to the questionable step, the variable characteristics will be appropriate; after the step they will be inappropriate.
  4. Look carefully at the code for that step. Continue using PROC PRINT, PROC FREQ, and PROC MEANS to examine the effect of each statement. In this way, you can identify the exact statement or statement group that is not working as you expect.
  5. Next, get a clear understanding of how the statement is working (as opposed to how you think it should work) by consulting the SAS Help function; click on the Help button in the SAS menu bar and scroll to SAS Help and Documentation; then, search for the particular statement or procedure. The results in hand should help you interpret the documentation.
  6. Finally, determine the appropriate code for your needs. Remember to check for other statements that involve this mistake.
   add comment

Your answer

Join with account you already have



 Write A Tutorials
Online-Classroom Classes

  1 person following this question

  Question tags

sas × 1

Asked 2 years and 3 months ago ago
Number of Views -276
Number of Answers -1
Last updated
3 years and 2 months ago ago

Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!