Problem Note 43743: E8601DT informat might read data from other variables
When a width is specified for the E8601DT informat that is longer than the input value, extra characters from variables in the step are read as well. The variable can be anywhere in the step. Incorrect results are produced.
data _null_;
length x $16 y $3;
x='2011-07-11T12:34';
y=':56';
value=input(x,e8601dt19.);
put value=datetime19.;
run;
The E8601DT informat is expecting to read 19 characters since 19 is the default width. Since the input value has only 16 characters, characters from other variables in the step may be appended to the end of the value. In the above example, the value for Y is absorbed into the value of X and the output is value=11JUL2011:12:34:56.
The workaround is to use an explicit width that matches the width of the first argument to the INPUT or INPUTN functions.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M0 | 9.4 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M0 | 9.4 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Server | 9.1 TS1M0 | |
Microsoft Windows 2000 Professional | 9.1 TS1M0 | |
Microsoft Windows NT Workstation | 9.1 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M0 | 9.4 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M0 | 9.4 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M0 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M0 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M0 | 9.4 TS1M0 |
HP-UX IPF | 9.1 TS1M0 | 9.4 TS1M0 |
Linux | 9.1 TS1M0 | 9.4 TS1M0 |
OpenVMS Alpha | 9.1 TS1M0 | 9.4 TS1M0 |
Tru64 UNIX | 9.1 TS1M0 | 9.4 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 |
Date Modified: | 2019-10-29 13:19:57 |
Date Created: | 2011-07-14 13:21:19 |