DATA Step, Macro, Functions and more

option nofmterr

Reply
N/A
Posts: 1

option nofmterr

In my SAS program I am using the option nofmterr since I have a SAS data set with custom formats but I do not have the corresponding SAS format library. So by using this option, instead of SAS generating ERROR messages, SAS generates NOTE messages that the format was not found or could not be loaded. Is there a way to eliminate these NOTE messages?
Super Contributor
Posts: 359

Re: option nofmterr

Try the NONOTES option
Trusted Advisor
Posts: 2,113

Re: option nofmterr

NONOTES gets rid of all notes, so it may be more than you want.

If you are running in batch and just want to get rid of just those messages, you could post-process with grep or something similar.
Super Contributor
Super Contributor
Posts: 3,174

Re: option nofmterr

Arbitrarily running a SAS application with NOFMTERR is dangerous, in my opinion. Depending on the number of the SAS variables which use a custom output format, you could consider using a FORMAT statement with no format to clear the output format attribute. And, if you wanted to do so programmatically, you have SAS-maintained views such as DICTIONARY.COLUMNS for which you can generate the FORMAT statement to clear the format attribute in your SAS application.

For more info on the DICTIONARY tables and SAS-maintained views, search the SAS support http://support.sas.com/ website and there you will find SAS-hosted documentation and also supplemental technical reference / conference papers on the topic.


Scott Barry
SBBWorks, Inc.
Regular Contributor
Posts: 151

Re: option nofmterr

Greetings.
I always use Format _all_ statement in such situation.
Oleg.
Super Contributor
Super Contributor
Posts: 3,174

Re: option nofmterr

To Oleg_1976: your approach may be a bit short-sighted in that you are removing all SAS variable output formats. Hopefully you don't do this type of logic with SAS code that others must support in addition to yourself.

I would liken your technique to hitting a fly with a Buick -- just to be sure you don't miss anything.

Better to address the condition on an individual variable basis, if a particular custom FORMAT is not available for your SAS session.

Scott Barry
SBBWorks, Inc.
Ask a Question
Discussion stats
  • 5 replies
  • 811 views
  • 0 likes
  • 5 in conversation