Problem Note 64582: The BESTX format is assigned to numeric variables when a custom format is assigned but the format has an unknown location to SAS®
When numeric variables are assigned custom formats but the location of the custom formats is unknown to SAS, the BESTX format is assigned to those variables.
The following steps illustrate an example where the BESTX format is assigned.
- Submit the following code:
options nofmterr;
data new;
x=10.2343;
y=2;
z=3.12;
format x mine.;
format y again.;
run;
The NOFMTERR system option prevents an error from appearing in the SAS® log because a custom format is specified for variables X and Y. However, the format definitions are not included.
Also, the CONTENTS procedure does not list the BESTX format.
- In the Explorer window, open the WORK library and open the data set New by double-clicking the data set name. Right-click either the X or Y column. Then select Column Attributes to see that the BESTX format is assigned:

If you open the Column Attributes window for variable Z, you see that Z has not been assigned the BESTX format.
- Submit the following FREQ procedure code:
proc freq data=new;
run;
In the output, real numbers are truncated to integers only. As shown here, the X value is equal to 10 rather than 10.2343 as expected.

The PROC CONTENTS output for the data set shows the correct custom format names.
If you do not want the BESTX format to be assigned, follow these steps:
- Remove the NOFMTERR system option.
- Save your intended format catalog by issuing a LIBNAME statement to the location where the catalog is stored.
- Name the new libref in the FMTSEARCH= system option.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.3 TS1M0 | |
z/OS 64-bit | 9.3 TS1M0 | |
Microsoft® Windows® for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 R2 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | |
Windows 7 Enterprise x64 | 9.3 TS1M0 | |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | |
Windows 7 Home Premium x64 | 9.3 TS1M0 | |
Windows 7 Professional 32 bit | 9.3 TS1M0 | |
Windows 7 Professional x64 | 9.3 TS1M0 | |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | |
Windows 7 Ultimate x64 | 9.3 TS1M0 | |
Windows Vista | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | |
64-bit Enabled HP-UX | 9.3 TS1M0 | |
64-bit Enabled Solaris | 9.3 TS1M0 | |
HP-UX IPF | 9.3 TS1M0 | |
Linux | 9.3 TS1M0 | |
Linux for x64 | 9.3 TS1M0 | |
Solaris for x64 | 9.3 TS1M0 | |
*
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.
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> Formats ==> Numeric
|
Date Modified: | 2019-09-11 13:48:28 |
Date Created: | 2019-08-08 08:16:14 |