<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Decode encoded HTML in Proc Stream in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Decode-encoded-HTML-in-Proc-Stream/m-p/202350#M4530</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I am trying to load an article which is stored as encoded html. So basicly this line:&lt;/P&gt;&lt;P&gt;&amp;lt;p&amp;gt;Hello world ; : ' " ! @ # $ % ^ &amp;amp; * ( ) &amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is stored as &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt; %3Cb%3EHello%20world!%20%3B%20%26%20%40%20'%3Cb%3E%0A&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Using proc stream and proc sql I can retrieve the data.&amp;nbsp; Now my problem is decoding the content. Obviously, I looked into &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001146073.htm"&gt;HTMLDECODE &lt;/A&gt;&lt;/P&gt;&lt;P&gt;However I am having trouble getting it to work in combination with Proc stream. Here is how I retrieve it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let GetContent =%sysfunc(dosubl(&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc sql noprint;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select M.content into :article SEPARATED&amp;nbsp; by ''&lt;/P&gt;&lt;P&gt;&amp;nbsp; from BE_TEMP.BI_ARTICLE M where M.id eq 12;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %let newArticle = htmldecode(&amp;amp;article)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;newArticle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone spot the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Mar 2015 16:23:49 GMT</pubDate>
    <dc:creator>Jorn</dc:creator>
    <dc:date>2015-03-16T16:23:49Z</dc:date>
    <item>
      <title>Decode encoded HTML in Proc Stream</title>
      <link>https://communities.sas.com/t5/Developers/Decode-encoded-HTML-in-Proc-Stream/m-p/202350#M4530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I am trying to load an article which is stored as encoded html. So basicly this line:&lt;/P&gt;&lt;P&gt;&amp;lt;p&amp;gt;Hello world ; : ' " ! @ # $ % ^ &amp;amp; * ( ) &amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is stored as &lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt; %3Cb%3EHello%20world!%20%3B%20%26%20%40%20'%3Cb%3E%0A&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Using proc stream and proc sql I can retrieve the data.&amp;nbsp; Now my problem is decoding the content. Obviously, I looked into &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001146073.htm"&gt;HTMLDECODE &lt;/A&gt;&lt;/P&gt;&lt;P&gt;However I am having trouble getting it to work in combination with Proc stream. Here is how I retrieve it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let GetContent =%sysfunc(dosubl(&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc sql noprint;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select M.content into :article SEPARATED&amp;nbsp; by ''&lt;/P&gt;&lt;P&gt;&amp;nbsp; from BE_TEMP.BI_ARTICLE M where M.id eq 12;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %let newArticle = htmldecode(&amp;amp;article)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;newArticle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone spot the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 16:23:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Decode-encoded-HTML-in-Proc-Stream/m-p/202350#M4530</guid>
      <dc:creator>Jorn</dc:creator>
      <dc:date>2015-03-16T16:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Decode encoded HTML in Proc Stream</title>
      <link>https://communities.sas.com/t5/Developers/Decode-encoded-HTML-in-Proc-Stream/m-p/202351#M4531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Either use %sysfunc when you call htmldecode function or put the function inside your PROC SQL select.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 16:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Decode-encoded-HTML-in-Proc-Stream/m-p/202351#M4531</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2015-03-16T16:30:03Z</dc:date>
    </item>
  </channel>
</rss>

