Problem Note 62314: Using the HTMLDECODE function might cause your SAS® session to close unexpectedly
Your SAS session might close unexpectedly if you use of the HTMLDECODE function with BASE64-encoded data. If your program is run as a batch process, the SAS log is blank showing no error messages.
To circumvent the problem, use the TRANWRD function instead of the HTMLDECODE function to substitute the following symbols:
&
<
>
"
'
The sample code on the Full Code tab illustrates the circumvention.
Click the Hot Fix tab in this note to access the hot fix for this issue.
The hot fix is for SAS® 9.4M4 (TS1M4).
Operating System and Release Information
SAS System | Base SAS | Windows 7 Home Premium x64 | 9.4 TS1M4 | 9.4 TS1M6 |
Windows 7 Professional 32 bit | 9.4 TS1M4 | 9.4 TS1M6 |
Windows 7 Professional x64 | 9.4 TS1M4 | 9.4 TS1M6 |
Windows 7 Home Premium 32 bit | 9.4 TS1M4 | 9.4 TS1M6 |
Windows 7 Enterprise x64 | 9.4 TS1M4 | 9.4 TS1M6 |
Windows 7 Enterprise 32 bit | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows Server 2012 Std | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M4 | |
Microsoft Windows Server 2008 R2 | 9.4 TS1M4 | |
Microsoft Windows Server 2008 | 9.4 TS1M4 | |
Microsoft Windows 10 | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows 8.1 Pro x64 | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows 8 Pro x64 | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows 8 Pro 32-bit | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M4 | 9.4 TS1M6 |
Microsoft® Windows® for x64 | 9.4 TS1M4 | 9.4 TS1M6 |
z/OS 64-bit | 9.4 TS1M4 | 9.4 TS1M6 |
z/OS | 9.4 TS1M4 | 9.4 TS1M6 |
Windows 7 Ultimate 32 bit | 9.4 TS1M4 | 9.4 TS1M6 |
Windows 7 Ultimate x64 | 9.4 TS1M4 | 9.4 TS1M6 |
64-bit Enabled AIX | 9.4 TS1M4 | 9.4 TS1M6 |
64-bit Enabled Solaris | 9.4 TS1M4 | 9.4 TS1M6 |
HP-UX IPF | 9.4 TS1M4 | 9.4 TS1M6 |
Linux for x64 | 9.4 TS1M4 | 9.4 TS1M6 |
Solaris for x64 | 9.4 TS1M4 | 9.4 TS1M6 |
*
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.
The sample code below uses the TRANWRD function instead of the HTMLDECODE function to substitute the following symbols:
&
<
>
"
'
data _null_;
length line1 $200;
infile cards truncover;
input line1 $;
/* Method one */
array s_(5)$6('&','<','>','"',''');
array t_(5)$1('&',"<",">",'"',"'");
line2=line1;
do i = 1 to 5;
line2=tranwrd(lowcase(line2),trim(s_(i)),t_(i));
end;
/* Method two */
line3=line1;
line3=tranwrd(lowcase(line3),'&','&');
line3=tranwrd(lowcase(line3),'<','<');
line3=tranwrd(lowcase(line3),'>','>');
line3=tranwrd(lowcase(line3),'"','"');
line3=tranwrd(lowcase(line3),''',"'");
put line1= / line2= / line3= /;
datalines4;
MH:*CI*6FIZBIJJNLK:ZOL+&RL[2UMK>XN;J[O+V^O\#!PL/$Q<;'R,G*R\S-
MH:*CI*6FIZBIJJNLK:>+&RL[2UMK>XN;J[O+V^O\#!PL/$Q<;'R,G*R\S-
;;;;
run;
Type: | Problem Note |
Priority: | high |
Date Modified: | 2020-02-06 16:04:12 |
Date Created: | 2018-05-14 09:59:59 |