A warning message from a FILENAME statement that uses the EMAIL access method might cause SAS to enter SYNTAXCHECK mode


A FILENAME statement that uses the EMAIL access method might cause SAS to enter SYNTAXCHECK mode if the TO field is missing. The missing field generates the following message in the SAS log:

WARNING: No email addresses specified.

When SAS enters SYNTAXCHECK mode, the following message appears in the log even though the above message is a warning, not an error:

NOTE: Due to ERROR(s) above, SAS set option OBS=0, enabling syntax check mode.
      This prevents execution of subsequent data modification statements.

A previous defect occurred, which related to using SMTP as the email interface. To fix the defect, an error was changed to a warning. See SAS Note 39614, "ERROR: No email addresses specified' when sending email from SAS using SMTP" for additional details. Since this issue originally generated an error, SYNTAXCHECK mode is still initiated.

Workaround

To prevent SAS from going into SYNTAXCHECK mode, you should correct the missing TO field with a valid value.

You can also circumvent this issue by completing the following steps:

  1. Disable SYNTAXCHECK with the following OPTIONS statement:
options nosyntaxcheck;
  1. Then, use the &syserr and &syscc macro variables for error checking. Note that if you run SAS interactively, the default setting is already NODMSSYNCHK.