AUTOCORRECT System Option

Specifies whether SAS attempts to automatically correct misspelled procedure names, misspelled procedure keywords, or misspelled global statement names.
Valid in: Configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Category: Environment control: Error handling
PROC OPTIONS GROUP= ERRORHANDLING
Note: This option can be restricted by a site administrator. For more information, see Restricted Options.

Syntax

Syntax Description

AUTOCORRECT
specifies that SAS attempts to automatically correct misspelled procedure names, misspelled procedure keywords, or misspelled global statement names. This is the default.
NOAUTOCORRECT
specifies that SAS does not automatically attempt to correct misspelled procedure names, misspelled procedure keywords, or misspelled global statement names.

Details

In previous releases of SAS, SAS always attempted to correct misspellings. The AUTOCORRECT option enables you to turn off autocorrection.
When AUTOCORRECT is set and a procedure name, a procedure keyword, or a global statement name is misspelled in a SAS program, SAS attempts to interpret the misspelling when a program is compiled. If the attempt succeeds, SAS corrects the error, prints a warning message to the log, and continues processing. If the error cannot be corrected, SAS writes an error message to the log.
When NOAUTOCORRECT is set, SAS writes the misspelling notification to the SAS log and ends the program.

Example

The following example shows a misspelled global statement name, a misspelled procedure option name, and a misspelled procedure name.
/* AUTOCORRECT is the default value */
options autocorrect;
data numbers;
   input x y z;
   datalines;
 14.2   25.2   96.8
 10.8   51.6   96.8
 33.5   27.4   66.5
run;

optionss obs=1;

proc print ddata=numbers;
run;

options noautocorrect;

proc prints ddata=numbers;
run;
6    options autocorrect;
7    data numbers;
8       input x y z;
9       datalines;
NOTE: The data set WORK.NUMBERS has 3 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           2.75 seconds
      cpu time            0.64 seconds
      
13   run;
14   
15   optionss obs=1;
     --------
     14
WARNING 14-169: Assuming the symbol OPTIONS was misspelled as optionss.

16   
17   proc print ddata=numbers;
                -----
                1
WARNING 1-322: Assuming the symbol DATA was misspelled as ddata.

18   run;
NOTE: There were 1 observations read from the data set WORK.NUMBERS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           3.84 seconds
      cpu time            1.07 seconds
      
19   
20   options noautocorrect;
21   
22   proc prints ddata=numbers;
          ------
          181
ERROR 181-322: Procedure name misspelled.

23   run;
NOTE: The SAS System stopped processing this step because of errors.