Usage Note 14954: "ERROR: Invalid character format/informat decimal specified" when
applying numeric format to character variable
When applying a numeric format or informat to a character variable,
the following error may be displayed:
ERROR: Invalid character format/informat decimal specified.
This occurs if the format or informat contains a decimal
specification. Here are examples that cause the error:
data _null_;
x='23';
y=input(x,$6.1);
run;
data _null_;
x='23';
format x 6.1;
run;
Removing the decimal specification of "1" prevents the error, however
a numeric format is then assigned to the character variable. It is
recommended that the format type matches the variable type.
Operating System and Release Information
| SAS System | Base SAS | Tru64 UNIX | 9 TS M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
| Microsoft Windows NT Workstation | 9 TS M0 | |
| Microsoft Windows XP Professional | 9 TS M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
| Microsoft Windows 2000 Server | 9 TS M0 | |
| Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
| Microsoft Windows 2000 Professional | 9 TS M0 | |
| Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
| Solaris | 9 TS M0 | |
| 64-bit Enabled Solaris | 9 TS M0 | |
| z/OS | 9 TS M0 | |
| 64-bit Enabled HP-UX | 9 TS M0 | |
| HP-UX IPF | 9 TS M0 | |
| HP-UX | 9 TS M0 | |
| Linux | 9 TS M0 | |
| OpenVMS Alpha | 9 TS M0 | |
| 64-bit Enabled AIX | 9 TS M0 | |
| AIX | 9 TS M0 | |
*
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: | Usage Note |
| Priority: | |
| Topic: | SAS Reference ==> Procedures ==> FORMAT
|
| Date Modified: | 2005-04-07 11:52:54 |
| Date Created: | 2005-04-07 11:52:54 |