SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 43337: B8601DT, B8601DA, B8601TM, and B8601DZ informats produce incorrect results

DetailsCodeOutputHotfixAboutRate It

When B8601DT and B8601DA informats read date fields missing the month or day portions, a value of 1 is to be supplied. For example, if '2009' is read with B8601DT, SAS creates a value of 01JAN2009:00:00. If '200905' is read with B8601DT, the value becomes 01MAY2009:00:00.

If a single hyphen is in the data value, as in 2009-05, SAS reads it incorrectly. If the value with the hyphen is the first input value for the column, the result is a missing value. If not the first, SAS can pick up leftover data in the buffer from a previous value.

A workaround is to compress out the hyphens and colons as shown in this example.

   final_date=input(compress(orig_date,'-: '),b8601dt.);

ORIG_DATE is a date value with hyphens, colons, and/or spaces.

Because hyphens are not being handled properly, a datetime value containing a negative GMT offset is not read properly. Values with positive offsets are read correctly. See Full Code tab for an example.

The B8601DT informat was renamed from ND8601DT. The documentation states that a "T" is required between the date and time portions. However, this was not being enforced by the informat. When the hotfix was built, this detail was discovered and was fixed. This hotfix caused data being read without the T in the value to be rejected by the informat. When this occurs, it is not necessary to back out of the hotfix. Simply change the informat to B8601DJ (reads Java datetime) because it does not require a T in the datetime value.

When the B8601TM informat specifies a width larger than the value being read, an incorrect result may be created. For example, specifying B8601TM8. to read a value with a width of six produces an incorrect result.

Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.1 TS1M09.3 TS1M1
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M09.3 TS1M1
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M09.3 TS1M1
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M09.3 TS1M1
Microsoft Windows 2000 Advanced Server9.1 TS1M0
Microsoft Windows 2000 Datacenter Server9.1 TS1M0
Microsoft Windows 2000 Server9.1 TS1M0
Microsoft Windows 2000 Professional9.1 TS1M0
Microsoft Windows NT Workstation9.1 TS1M0
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M09.3 TS1M1
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M09.3 TS1M1
Microsoft Windows Server 2003 Standard Edition9.1 TS1M09.3 TS1M1
Microsoft Windows XP Professional9.1 TS1M09.3 TS1M1
64-bit Enabled AIX9.1 TS1M09.3 TS1M1
64-bit Enabled HP-UX9.1 TS1M09.3 TS1M1
64-bit Enabled Solaris9.1 TS1M09.3 TS1M1
HP-UX IPF9.1 TS1M09.3 TS1M1
Linux9.1 TS1M09.3 TS1M1
OpenVMS Alpha9.1 TS1M09.3 TS1M1
Tru64 UNIX9.1 TS1M09.3 TS1M1
* 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.