Valid syntax is displayed in red in the Enhanced Editor window


When a SAS® application recognizes a keyword, the keyword changes to a defined color in the Enhanced Editor window. However, correct syntax can appear in red instead of the expected black or blue. If the program executes without generating a syntax error in the log, then the problem is in the Enhanced Editor and the results are correct.

To circumvent this problem, you can add the unrecognized program element to the user-defined keywords in the Microsoft Windows system.

To create and format user-defined keywords, use the Enhanced Editor Options dialog box as follows:

  1. Make an Enhanced Editor window the active window.
  2. Select Tools ► Options ► Enhanced Editor.
  3. From the General tab, click User-Defined Keyword.
  4. Click Add.
  5. Replace NewKeyword with your keyword.
  6. Click OK.
  7. Select the Appearance tab.
  8. In the File elements box, select User-defined keyword.
  9. Select a font, foreground color, and background color.
  10. Click OK.