Lesson 1.3: What if there is an error?
Typos, spelling mistakes or programming errors cannot be avoided in any programming language. The place to check any type of errors is in the ‘Log’ window.
This example illustrates how to check errors in the log window:
INPUT name $ dept $;
There are two errors in the codes above (highlighted in red!):
As a result, SAS shows 2 error messages and 3 warning messages in the log window. Any error message will be highlighted in red and warning message (a less severe problem determined by SAS) will be highlighted in green. It is very helpful to keep a habit of checking the log window whenever a set of codes is run.
DONE! You have learned to check programming errors in SAS.