BookmarkSubscribeRSS Feed
kc0607
Calcite | Level 5
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?
5 REPLIES 5
Flip
Fluorite | Level 6
Try the NONOTES option
Doc_Duke
Rhodochrosite | Level 12
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.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.
Oleg_L
Obsidian | Level 7
Greetings.
I always use Format _all_ statement in such situation.
Oleg.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 6963 views
  • 0 likes
  • 5 in conversation