In the program below,
the DATA step copies the SAS data set Clinic.Admit into a new data
set named Clinic.Admitfee. The PROC step should print the values for
the variables ID, Name, Actlevel, and Fee in the new data set. However,
the SAS keyword
print is misspelled in
the PROC PRINT statement.
data sasuser.admitfee;
set sasuser.admit;
run;
proc prin data=sasuser.admitfee;
var id name actlevel fee;
run;
When the program is
submitted, messages in the Log window indicate
that the procedure PRIN was not found and that SAS stopped processing
the PROC step because of errors. No output is produced by the PRINT
procedure, because the second step fails to execute.
Note: Errors in your statements
or data might not be evident when you look at results in the Results viewer.
Review the messages in the Log window each
time you submit a SAS program.
In addition to correcting spelling
mistakes, you might need to resolve other common syntax errors such
as these:
-
-
-
unbalanced quotation mark
You might also need
to correct a semantic error such as this: