If you have an error
in your SAS code, SAS Studio makes it easy to identify the problem.
Let’s add an error to your original program and see how it
works.
Click the
Code tab
to open your program. Add a new line after the first line of the program
and enter this text:
error;
Your program should
look like this:
proc print data=sashelp.class;
error;
run;
Click
to run the program. This time, the
Log tab opens automatically
to show you that you have an error.
In the Errors, Warnings,
Notes section, expand
Errors to view a description
of the error. Click the error message, and SAS Studio highlights it
for you in the log so that you can see exactly where the error occurred.
You can return to your
program and correct the error. However, if you have a very long and
complicated program that has a lot of errors, you might want to return
to an earlier version of your program in which you knew all the code
was correct. SAS Studio maintains a log, or submission history, with
entries for each time you run a program, so you can easily return
to an earlier version of a program.
To find an earlier version
of your program, click the
Code tab to view
the current version of your program. On the toolbar, click
and then click the first version of the program.
The original version
of your program opens in a new window from which you can copy and
paste the error-free code into your original program or into a new
program.