Problem Note 45376: The B8601DZ format does not format in the Z notation
The B8601DZw. format writes datetime values for the zero meridian Coordinated Universal Time (UTC) time by using the ISO 8601 datetime and time zone basic notation yyyymmddThhmmss+0000. When the specified width is less than enough to output the +0000 portion, a Z should be output instead.
The Z is not output as it should be. Instead, an error is written to the log as follows:
ERROR: Width specified for format B8601DZ is invalid.
The documentation for the B8601DZw. format indicates the minimum width is 20 and it should be 16. This will be changed in a future release of the documentation.
Operating System and Release Information
SAS System | N/A | Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | 9.4 TS1M0 |
Microsoft Windows XP Professional | 9.2 TS1M0 | 9.4 TS1M0 |
Windows Vista | 9.2 TS1M0 | 9.4 TS1M0 |
Windows Vista for x64 | 9.2 TS1M0 | 9.4 TS1M0 |
64-bit Enabled AIX | 9.2 TS1M0 | 9.4 TS1M0 |
64-bit Enabled HP-UX | 9.2 TS1M0 | 9.4 TS1M0 |
64-bit Enabled Solaris | 9.2 TS1M0 | 9.4 TS1M0 |
HP-UX IPF | 9.2 TS1M0 | 9.4 TS1M0 |
Linux | 9.2 TS1M0 | 9.4 TS1M0 |
Linux for x64 | 9.2 TS1M0 | 9.4 TS1M0 |
OpenVMS on HP Integrity | 9.2 TS1M0 | 9.4 TS1M0 |
Solaris for x64 | 9.2 TS1M0 | 9.4 TS1M0 |
z/OS | 9.2 TS1M0 | 9.4 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | 9.4 TS1M0 |
Microsoft® Windows® for x64 | 9.2 TS1M0 | 9.4 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | 9.4 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.2 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.
When the width of the format is too small for the +0000 to be appended to the end of the value, a Z should be output instead. This doesn't occur and the ERROR outputs instead.
data _null_;
input @1 x b8601dz.;
put x=;
put x b8601dz19.;
put x b8601dz26.;
datalines;
20110915T155300+0500
20110915T155300Z
;
run;
24 data _null_;
25 input @1 x b8601dz.;
26 put x=;
27 put x b8601dz19.;
----------
29
ERROR 29-185: Width specified for format B8601DZ is invalid.
28 put x b8601dz26.;
29 datalines;
Type: | Problem Note |
Priority: | medium |
Topic: | SAS Reference ==> Formats ==> Date and Time
|
Date Modified: | 2012-01-31 10:39:48 |
Date Created: | 2012-01-12 11:39:37 |