<?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: SQL 'SHA2_256' equivalent in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343252#M78797</link>
    <description>&lt;P&gt;As I understand it, SAS uses the "global" available algorithm. So it shouldn't be any difference.&lt;/P&gt;
&lt;P&gt;How did you verify that didn't have any luck?&lt;/P&gt;
&lt;P&gt;Perhaps it's the data that changed between the environments. Transcoding/truncation&amp;nbsp;of trailing blanks&amp;nbsp;etc can occur.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2017 12:54:49 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2017-03-22T12:54:49Z</dc:date>
    <item>
      <title>SQL 'SHA2_256' equivalent in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343227#M78790</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;somebody hashed account number using the SQL code: 'SHA2_256'&amp;nbsp;. Is there a SAS equivalent function to give the same hashed account? I used SHA256 but no luck yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help will be highly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;many thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 10:57:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343227#M78790</guid>
      <dc:creator>Monty82</dc:creator>
      <dc:date>2017-03-22T10:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL 'SHA2_256' equivalent in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343252#M78797</link>
      <description>&lt;P&gt;As I understand it, SAS uses the "global" available algorithm. So it shouldn't be any difference.&lt;/P&gt;
&lt;P&gt;How did you verify that didn't have any luck?&lt;/P&gt;
&lt;P&gt;Perhaps it's the data that changed between the environments. Transcoding/truncation&amp;nbsp;of trailing blanks&amp;nbsp;etc can occur.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:54:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343252#M78797</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-03-22T12:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: SQL 'SHA2_256' equivalent in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343291#M78803</link>
      <description>&lt;P&gt;The output of the SHA256 function in SAS is the raw bytes. &amp;nbsp;I assume you want the hash string. &amp;nbsp;In which case you just want to combine the SHA256 function call with a PUT function and the $hex64. format. &amp;nbsp;Without specifying what SQL implementation you are referring to, I can only speculate what you are really looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data foo;
set sashelp.class;
hash_name=put(sha256(name),$hex64.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Mar 2017 14:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343291#M78803</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2017-03-22T14:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: SQL 'SHA2_256' equivalent in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343296#M78804</link>
      <description>Thanks for your help. I found out what my issue was. Hashing variable from numeric and character give different values. Yes, I used the same code as you mentioned. Thanks for that.</description>
      <pubDate>Wed, 22 Mar 2017 14:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343296#M78804</guid>
      <dc:creator>Monty82</dc:creator>
      <dc:date>2017-03-22T14:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: SQL 'SHA2_256' equivalent in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343297#M78805</link>
      <description>Thanks for your help. I found out what my issue was. Hashing variable from numeric and character give different values. Thanks for that.</description>
      <pubDate>Wed, 22 Mar 2017 14:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-SHA2-256-equivalent-in-SAS/m-p/343297#M78805</guid>
      <dc:creator>Monty82</dc:creator>
      <dc:date>2017-03-22T14:47:16Z</dc:date>
    </item>
  </channel>
</rss>

