Problem Note 4001: COMPRESS FUNCTION with YYQw., MONYYw. and YYMMNw. INFORMATS and missing
values gives incorrect results
When a missing value is passed to the COMPRESS function and the the
YYQw., MONYYw., or YYMMnw. informats are used to read the value in an
INPUT function, incorrect results are produced. The value returned
is from the last observation which had non-missing values. For
example:
data _null_;
input yy $ mm $;
date=input(compress(yy||mm),yymmn4.);
put date=;
cards;
94 09
. .
99 10
;
run;
incorrectly produces:
date=12662
date=12662
date=14518
in the SAS Log.
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | Base SAS | Microsoft Windows NT Workstation | 8 TS M0 | 8.2 TS2M0 |
| CMS | 8 TS M0 | 8.2 TS2M0 |
| Microsoft Windows 95/98 | 8 TS M0 | 8.2 TS2M0 |
| Microsoft Windows 2000 Server | 8 TS M0 | 8.2 TS2M0 |
| Microsoft Windows 2000 Professional | 8 TS M0 | 8.2 TS2M0 |
| Microsoft Windows 2000 Datacenter Server | 8 TS M0 | 8.2 TS2M0 |
| Microsoft Windows 2000 Advanced Server | 8 TS M0 | 8.2 TS2M0 |
| OpenVMS VAX | 8 TS M0 | 8.2 TS2M0 |
| IRIX | 8 TS M0 | 8.2 TS2M0 |
| Solaris | 8 TS M0 | 8.2 TS2M0 |
| 64-bit Enabled Solaris | 8 TS M0 | 8.2 TS2M0 |
| OS/2 | 8 TS M0 | 8.2 TS2M0 |
| z/OS | 8 TS M0 | 8.2 TS2M0 |
| ABI+ for Intel Architecture | 8 TS M0 | 8.2 TS2M0 |
| HP-UX | 8 TS M0 | 8.2 TS2M0 |
| 64-bit Enabled HP-UX | 8 TS M0 | 8.2 TS2M0 |
| OpenVMS Alpha | 8 TS M0 | 8.2 TS2M0 |
| 64-bit Enabled AIX | 8 TS M0 | 8.2 TS2M0 |
| Tru64 UNIX | 8 TS M0 | 8.2 TS2M0 |
| AIX | 8 TS M0 | 8.2 TS2M0 |
*
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: | high |
| Topic: | SAS Reference ==> Informats SAS Reference ==> Functions ==> Character ==> COMPRESS
|
| Date Modified: | 2008-03-18 14:12:18 |
| Date Created: | 2000-12-20 12:25:50 |