Note: For the purpose of this note, both informats and formats are referred to as formats.
The following error can have several possible causes:
ERROR: The format [NAME] was not found or could not be loaded.
This SAS® Note is intended to help you identify the reason for the above error.
The most common cause of the error is that the SAS formats catalog cannot be found. By default, SAS always looks first for formats in the formats.sas7bcat catalog in the WORK library and in the path that is specified by the LIBRARY libref. For further information related to this topic, see the following note:
- SAS Note 40103, "Frequently asked questions about making user-defined formats available in a SAS® Business Intelligence deployment"
A second cause is that SAS cannot find the requested entry in the formats catalog. To troubleshoot this issue, use the CATALOG procedure or FORMAT procedure and the FMTLIB option. The FMTLIB option lists the ranges and value labels for each format entry so if it is a rather large catalog, the CONTENTS statement in PROC CATALOG is a more practical alternative.
PROC CATALOG CAT=WORK.FORMATS; CONTENTS; QUIT;
PROC FORMAT LIB=WORK FMTLIB; RUN;
After you have verified that the format exists in the catalog, check to make sure the format name is spelled correctly in the program.
Another common cause of the error is when the format type and the variable type do not match. If the format is character and the variable is numeric or vice versa, there is a type mismatch and the format cannot be found.
You can identify this common cause by inspecting the section of the log where the error occurs. For example, the error that is shown in the below log displays an error that the format $A was not found. However, the PUT function lacks the $ in the format name.
5844 proc format;
5845 value a 1='one';
NOTE: Format A has been output.
5846 run;
NOTE: PROCEDURE FORMAT used:
real time 0.01 seconds
cpu time 0.01 seconds
5847
5848 data test;
5849 x='1';
5850 y=put(x,a.);
--
48
ERROR 48-59: The format $A was not found or could not be loaded.
5851 run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST may be incomplete. When this step was stopped there were 0 observations and 2 variables.
WARNING: Data set WORK.TEST was not replaced because this step was stopped.
NOTE: DATA statement used:
real time 0.05 seconds
cpu time 0.03 seconds
Finally, it is possible that there is not enough memory available to load the format. For helpful information about this topic, see SAS Note 30997, "Does PROC FORMAT have a limit on the number of unique values that can be defined or the amount of memory I need to load a format?" It is recommended that you rule out all other causes before concluding that memory is the reason for the error.
While there can be other causes for this error, the situations above account for the vast majority of the causes. If you cannot determine the cause of the error, further help can be obtained by contacting SAS Technical Support.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.