<?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 Re: Image conversion to Base64 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806556#M317803</link>
    <description>&lt;P&gt;There will be different images to encode.&amp;nbsp; I found out from the solution post that I can utilize the x commands in SAS along with macros to complete what is needed.&amp;nbsp; Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 15:55:58 GMT</pubDate>
    <dc:creator>maleman</dc:creator>
    <dc:date>2022-04-07T15:55:58Z</dc:date>
    <item>
      <title>Image conversion to Base64</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806169#M317588</link>
      <description>&lt;P&gt;I am trying to take an image that's stored in my directory, e.g. '~/' and convert the image into a base64 string using SAS Viya 3.5.&amp;nbsp; I can convert text strings to base64, but am having issues with actual images.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 22:28:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806169#M317588</guid>
      <dc:creator>maleman</dc:creator>
      <dc:date>2022-04-05T22:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Image conversion to Base64</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806190#M317600</link>
      <description>&lt;P&gt;Is it a different image you need to encode each time?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 05:14:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806190#M317600</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2022-04-06T05:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Image conversion to Base64</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806191#M317601</link>
      <description>&lt;P&gt;Since most images are larger than what a SAS variable can hold, you're better off using a suitable external utility, most likely &lt;A href="https://linux.die.net/man/1/base64" target="_blank" rel="noopener"&gt;base64&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 05:24:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806191#M317601</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-04-06T05:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Image conversion to Base64</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806554#M317801</link>
      <description>&lt;P&gt;Thank you.&amp;nbsp; I was able to utilize the x command and write it to a file to accomplish what I needed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 15:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806554#M317801</guid>
      <dc:creator>maleman</dc:creator>
      <dc:date>2022-04-07T15:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Image conversion to Base64</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806556#M317803</link>
      <description>&lt;P&gt;There will be different images to encode.&amp;nbsp; I found out from the solution post that I can utilize the x commands in SAS along with macros to complete what is needed.&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 15:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806556#M317803</guid>
      <dc:creator>maleman</dc:creator>
      <dc:date>2022-04-07T15:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Image conversion to Base64</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806559#M317807</link>
      <description>&lt;P&gt;If you want to reliably automate external commands from SAS, I recommend to not use the X statement, as it gives you no real information about success or nonsuccess (apart from setting &amp;amp;SYSRC).&lt;/P&gt;
&lt;P&gt;Instead, use a pipe:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "&amp;lt;your command here&amp;gt; 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;All output created by the external command(s) will be written to the SAS log. Since the 2&amp;gt;&amp;amp;1 construct reroutes &lt;A href="https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)" target="_blank" rel="noopener"&gt;stderr&lt;/A&gt; to &lt;A href="https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout)" target="_blank" rel="noopener"&gt;stdout&lt;/A&gt;, all error messages are also caught and preserved.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 16:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/806559#M317807</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-04-07T16:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Image conversion to Base64</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/814479#M321469</link>
      <description>&lt;P&gt;Hi!!! I try the code in the next page that works fine:&amp;nbsp;&lt;A href="https://support.selerity.com.au/hc/en-us/articles/223345708-Tip-SAS-and-Base64" target="_blank"&gt;https://support.selerity.com.au/hc/en-us/articles/223345708-Tip-SAS-and-Base64&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 18:46:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Image-conversion-to-Base64/m-p/814479#M321469</guid>
      <dc:creator>Sharkman</dc:creator>
      <dc:date>2022-05-20T18:46:18Z</dc:date>
    </item>
  </channel>
</rss>

