Problem Note 62380: PROC FCMP in UTF-8 session encoding generates different results in SAS® 9.4 TS1M5
Beginning in the fifth maintenance release of SAS 9.4 (TS1M5), formatting character strings in PROC FCMP might result in invalid characters in a multi-byte character encoding. Applying the format in a single-byte encoding such as WLATIN1 or LATIN1 displays the correct characters. In prior releases, a multi-byte character encoding such as UTF8 generated equivalent results as LATIN1 or WLATIN1 encoding.
If you do not know your SAS session encoding, you can look in the log after submitting:
proc options option=encoding;
run;
You can submit the code on the Full Code tab to replicate the problem.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Note: This issue is fixed in Rev. 940_18w30.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
z/OS 64-bit | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft® Windows® for x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows 8 Enterprise 32-bit | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows 8 Enterprise x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows 8 Pro 32-bit | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows 8 Pro x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows 8.1 Enterprise x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows 8.1 Pro 32-bit | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows 8.1 Pro x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows 10 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows Server 2008 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows Server 2008 R2 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows Server 2008 for x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows Server 2012 Datacenter | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows Server 2012 R2 Std | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows Server 2012 Std | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Microsoft Windows Server 2016 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Windows 7 Enterprise 32 bit | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Windows 7 Enterprise x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Windows 7 Home Premium 32 bit | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Windows 7 Home Premium x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Windows 7 Professional 32 bit | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
64-bit Enabled Solaris | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
64-bit Enabled AIX | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Windows 7 Ultimate x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Linux for x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
HP-UX IPF | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Windows 7 Ultimate 32 bit | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Windows 7 Professional x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
Solaris for x64 | 9.4_M5 | 9.4_M5 | 9.4 TS1M5 | 9.4 TS1M5 |
*
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.
Using SAS 9.4 TS1M5, a PROC FCMP function that formats a character string might produce incorrect results if you are running SAS in a multi-byte session encoding. The code below illustrates this issue.
If you run the following example code using SAS in WLATIN1 session encoding, you will see a hexadecimal representation of 'TESTING' in EBCDIC:
result=E3C5E2E3C9D5C7
However, if you run the same test with session encoding UTF8 in SAS 9.4 TS1M5, the last character is truncated:
result=E3C5E2E3C9D5
proc fcmp;
length mystr $ 64 result $ 64;
mystr = 'TESTING: ';
result = putc(putc(mystr, '$EBCDIC7.'), 'HEX64.');
put result=;
run;
PROC FCMP function results might be different in a UTF-8 SAS session encoding. A hot fix is available to improve character string manipulation within PROC FCMP to restore the behavior from the fourth maintenance release of SAS
® 9.4 (TS1M4).
Type: | Problem Note |
Priority: | high |
Date Modified: | 2018-08-14 09:34:50 |
Date Created: | 2018-05-29 20:36:27 |