<?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 Hashes, Checksums and all the rest... in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43706#M8961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update: I found this, which is quite helpful:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi27/p088-27.pdf"&gt;http://www2.sas.com/proceedings/sugi27/p088-27.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nonetheless, is there a PROC CHECKSUM or something like it, that would do the trick? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Nov 2011 14:17:34 GMT</pubDate>
    <dc:creator>thomash123</dc:creator>
    <dc:date>2011-11-08T14:17:34Z</dc:date>
    <item>
      <title>Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43705#M8960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to find a quick way to check if a dataset (with all its columns and observations) is still looking the same as after a change to the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say a dataset with 1mio observations and 1 row contains just an "a" in each observation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I change something to my code (which in my case is some PRXPARSE action) and run the job again...I would expect that the result is the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I check that efficiently? How do I e.g. build a hash over everything a dataset contains...or a checksum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 13:44:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43705#M8960</guid>
      <dc:creator>thomash123</dc:creator>
      <dc:date>2011-11-08T13:44:12Z</dc:date>
    </item>
    <item>
      <title>Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43706#M8961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update: I found this, which is quite helpful:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/sugi27/p088-27.pdf"&gt;http://www2.sas.com/proceedings/sugi27/p088-27.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nonetheless, is there a PROC CHECKSUM or something like it, that would do the trick? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 14:17:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43706#M8961</guid>
      <dc:creator>thomash123</dc:creator>
      <dc:date>2011-11-08T14:17:34Z</dc:date>
    </item>
    <item>
      <title>Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43707#M8962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are only interested in whether the files are the same, your fastest check might be to pipe your operating systems file compare routine.&amp;nbsp; In windows that could be the fc command for which you can include the /LB1 option which (I think) will only allow one consecutive missmatch.&amp;nbsp; Thus, if you don't receive the "no differences encountered" message, the files contain at least one difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 14:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43707#M8962</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-11-08T14:19:41Z</dc:date>
    </item>
    <item>
      <title>Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43708#M8963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is changing in code? Do you expect that the new code will produce the exact same results?&lt;/P&gt;&lt;P&gt;Do you have access to the old data?&amp;nbsp; then use PROC COMPARE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checksum concept is useful to testing when you do not have access to the original data.&amp;nbsp; Such as when receiving a file or communication from someone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 15:07:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43708#M8963</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-11-08T15:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43709#M8964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The problem with operating system file compare on SAS datasets is that datasets include metadata such as when it was created, operating system etc that is not really important in testing if the information contained in the two files are the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 15:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43709#M8964</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-11-08T15:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43710#M8965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you are running the code anyways after your code change, something like this should work:&lt;/P&gt;&lt;P&gt;* first a little example data set with two variables;&lt;/P&gt;&lt;P&gt;data stuff;&lt;/P&gt;&lt;P&gt;infile cards;&lt;/P&gt;&lt;P&gt;input;&lt;/P&gt;&lt;P&gt;var1 = scan(_INFILE_,1);&lt;/P&gt;&lt;P&gt;var2 = scan(_INFILE_,2);&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;a c&lt;/P&gt;&lt;P&gt;a d&lt;/P&gt;&lt;P&gt;And the subsequent step with the checksum code;&lt;/P&gt;&lt;P&gt;﻿data stuff(drop=check all);&lt;BR /&gt;&amp;nbsp; format check $hex32.;&lt;BR /&gt;&amp;nbsp; retain check;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; set stuff end=eof;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;*&amp;nbsp; if _n_ = 3 then var1 = 'x';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; all = cats(var1,var2,check);&lt;BR /&gt;&amp;nbsp; check = md5(all);&lt;BR /&gt;&amp;nbsp; if eof then put check=;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;First you create a variable called check with a format of hex 32.&amp;nbsp; Then you retain it so it's value is available with each iteration of the data step.&amp;nbsp; Then set your data set with the end= option so we know when we've reached the end.&amp;nbsp; The commented out if statement represents your current data step code (and uncommenting it should change the checksum).&amp;nbsp; At the bottom is the actual checksum code.&amp;nbsp; First concatenate all the variables you are interested in checking into a variable called all.&amp;nbsp; Notice we are including the check variable.&amp;nbsp; Then use the md5() function to hash it.&amp;nbsp; Finally if it's the end of the data set then write the checksum to the log.&amp;nbsp; Run that once and note the checksum.&amp;nbsp; Then uncomment the if statement and you will see the checksum change.&amp;nbsp; The checksum is for all of the data set since each observation's checksum is built partly from the previous checksum.&lt;/P&gt;&lt;P&gt;Hope that helps! -stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 21:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43710#M8965</guid>
      <dc:creator>sasCoders_com</dc:creator>
      <dc:date>2011-11-10T21:45:59Z</dc:date>
    </item>
    <item>
      <title>Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43711#M8966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom speaks the truth on this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;P&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://communities.sas.com/people/Tom" id="jive-243121450640370419803" style="background-color: #f9f9f9; color: #0e66ba; font-weight: bold; text-align: center;"&gt;Tom&lt;/A&gt; wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="jive-rendered-content"&gt;&lt;P&gt;The problem with operating system file compare on SAS datasets is that datasets include metadata such as when it was created, operating system etc that is not really important in testing if the information contained in the two files are the same.&lt;/P&gt;&lt;/DIV&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I agree with his recommendation to use proc compare.&amp;nbsp; I like sascoders concept, I would not recommend using this approach for a table with many different data types though for a simple table it is interesting:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data way1;&lt;/P&gt;&lt;P&gt; informat v1-v2 $1.;&lt;/P&gt;&lt;P&gt; input v1-v2;&lt;/P&gt;&lt;P&gt; hash=put(md5(cats(of v1 v2)),$hex32.);&lt;/P&gt;&lt;P&gt; cards;&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;c d&lt;/P&gt;&lt;P&gt;e f&lt;/P&gt;&lt;P&gt;g h&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data way2;&lt;/P&gt;&lt;P&gt; input v1 $ v2 $;&lt;/P&gt;&lt;P&gt; hash=put(md5(cats(v1,v2)),$hex32.);&lt;/P&gt;&lt;P&gt; cards;&lt;/P&gt;&lt;P&gt;a b&lt;/P&gt;&lt;P&gt;c d&lt;/P&gt;&lt;P&gt;e f&lt;/P&gt;&lt;P&gt;g h&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt; if 0 then set way1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; declare hash w1(dataset:'way1');&lt;/P&gt;&lt;P&gt;&amp;nbsp; w1.definekey('hash');&lt;/P&gt;&lt;P&gt;&amp;nbsp; w1.definedone();&lt;/P&gt;&lt;P&gt; declare hiter w1iter('w1');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; declare hash w2(dataset:'way2');&lt;/P&gt;&lt;P&gt;&amp;nbsp; w2.definekey('hash');&lt;/P&gt;&lt;P&gt;&amp;nbsp; w2.definedone();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; do while(w1iter.next()=0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if w2.find() ne 0 then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; putlog 'ERROR: These datasets are different';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bad+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt; end;&lt;/P&gt;&lt;P&gt; if bad=0 then put 'NOTE: These datasets are the same';&lt;/P&gt;&lt;P&gt; stop;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: These datasets are the same&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 22:46:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43711#M8966</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2011-11-10T22:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43712#M8967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure why you would say it is not good for a table with many different data types? (Only two data types in SAS).&amp;nbsp; And why the subsequent step creating hashes to compare?&amp;nbsp; There is no need.&amp;nbsp; In my code, the hash (hash in the sense that it is a unique fingerprint, not a hash like associative array) at the end of the data step is unique to the entire data step, not just per observation.&amp;nbsp; Again, notice that the result of the hash of the previous observation is fed into the hashing of the current observation in my code.&amp;nbsp; Resulting in a unique hash fingerprint for the entire data step.&amp;nbsp; In one pass.&amp;nbsp; Comparing this final value to the original on subsequent runs of the data step would tell you if _any_ of the observations changed.&amp;nbsp; I believe this is what the original poster asked for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 23:17:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43712#M8967</guid>
      <dc:creator>sasCoders_com</dc:creator>
      <dc:date>2011-11-10T23:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43713#M8968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just browsed through my old requests and I totally forgot to thank you for your help! So here it is: Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used this method for quite a while now - works like a charm. Is there a way to cats() all variables of a dataset without listing each column? Gets quite heavy with &amp;gt;200 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 13:42:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43713#M8968</guid>
      <dc:creator>thomash123</dc:creator>
      <dc:date>2012-07-27T13:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43714#M8969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can put all your variables in a macro variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 13:45:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43714#M8969</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-27T13:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43715#M8970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, but how does that work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 13:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43715#M8970</guid>
      <dc:creator>thomash123</dc:creator>
      <dc:date>2012-07-27T13:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43716#M8971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RED parts using upcase&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input (a b c d)(:$2.);&lt;BR /&gt;cards;&lt;BR /&gt;aa bb cc dd&lt;BR /&gt;ab cd ef gr&lt;BR /&gt;;&lt;BR /&gt;proc sql noprint;&lt;BR /&gt;&amp;nbsp; select name into :vars separated by ',' from&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dictionary.columns&lt;BR /&gt;&amp;nbsp;&amp;nbsp; where libname=&lt;SPAN style="color: #ff0000;"&gt;'WORK'&lt;/SPAN&gt; and memname=&lt;SPAN style="color: #ff0000;"&gt;'HAVE'&lt;/SPAN&gt;;&lt;BR /&gt;quit;&lt;BR /&gt;%put &amp;amp;vars;&lt;BR /&gt;data want;&lt;BR /&gt; length newvar $ 20;&lt;BR /&gt; set have;&lt;BR /&gt; newvar=cats(&amp;amp;vars);&lt;BR /&gt; proc print;run;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Obs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newvar&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; d&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aabbccdd&amp;nbsp;&amp;nbsp;&amp;nbsp; aa&amp;nbsp;&amp;nbsp;&amp;nbsp; bb&amp;nbsp;&amp;nbsp;&amp;nbsp; cc&amp;nbsp;&amp;nbsp;&amp;nbsp; dd&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; abcdefgr&amp;nbsp;&amp;nbsp;&amp;nbsp; ab&amp;nbsp;&amp;nbsp;&amp;nbsp; cd&amp;nbsp;&amp;nbsp;&amp;nbsp; ef&amp;nbsp;&amp;nbsp;&amp;nbsp; gr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 13:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43716#M8971</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-27T13:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43717#M8972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to cat all variables&lt;/P&gt;&lt;P&gt;try cats( of _all_ )&lt;/P&gt;&lt;P&gt;Here is a saslog snippet demonstrating&lt;/P&gt;&lt;P&gt; 219&amp;nbsp; data demo ;&lt;/P&gt;&lt;P&gt; 220&amp;nbsp; input abc $ num dum $ datex : date11. ;&lt;/P&gt;&lt;P&gt; 221&amp;nbsp; format datex yymmdd10. ;&lt;/P&gt;&lt;P&gt; 222&amp;nbsp; list;datalines;&lt;/P&gt;&lt;P&gt;RULE:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----&lt;/P&gt;&lt;P&gt;223&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qwer&amp;nbsp; 3456 dum 12DEc2012&lt;/P&gt;&lt;P&gt;224&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mnbvc&amp;nbsp; 9876543 dum 21dec12345&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #365f91;"&gt;NOTE: The data set WORK.DEMO has 2 observations and 4 variables.&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #365f91;"&gt;NOTE: DATA statement used (Total process time):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #365f91;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #365f91;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;225&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;226&amp;nbsp; data catstest( compress= yes);&lt;/P&gt;&lt;P&gt;227&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set demo ;&lt;/P&gt;&lt;P&gt;228&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; length all $10000 ;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;229&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; all = cats( of _all_ ) ;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;230&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put _all_ ;&lt;/P&gt;&lt;P&gt;231&amp;nbsp; run ;&lt;/P&gt;&lt;P&gt;abc=qwer num=3456 dum=dum datex=2012-12-12 &lt;STRONG&gt;all=qwer3456dum19339&lt;/STRONG&gt; _ERROR_=0 _N_=1&lt;/P&gt;&lt;P&gt;abc=mnbvc num=9876543 dum=dum datex=****-12-21 &lt;STRONG&gt;all=mnbvc9876543dum3793395&lt;/STRONG&gt; _ERROR_=0 _N_=2&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #365f91;"&gt;NOTE: There were 2 observations read&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 19:57:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43717#M8972</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2012-07-27T19:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43718#M8973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Peter!&lt;EM&gt; - LInlin&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 13:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/43718#M8973</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2012-07-30T13:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/370498#M88481</link>
      <description>&lt;P&gt;if i run&amp;nbsp;&amp;nbsp;all = cats( of _all_ ) ; on a subset of a dataset the code works perfectly fine, however, when I try to run it on an entire dataset (20 000+ records) the code fails with the error "An error occured when executing the workspace job program.sas. &amp;nbsp;Server is disconnected"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why would this happen and how do I get to run this on a large dataset?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to build MD5 checksums on large datasets without having to specify all the columns/attributes everytime. &amp;nbsp;I am looking for something generic.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 12:02:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/370498#M88481</guid>
      <dc:creator>marinavdl</dc:creator>
      <dc:date>2017-06-26T12:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Hashes, Checksums and all the rest...</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/385440#M92193</link>
      <description>&lt;P&gt;I have been using a macro variable with a comma delimited list of variables i want to sent to md5. so it looks like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let keyvars = %bquote(subjid, lbrefid, lbreqno, lbtestr, lbdat, lbtpt, lbrptid, lbmethod);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to make it easier to live with I use a put function in creating the checksum variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data x;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set y;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length checksum&amp;nbsp;$32;&lt;/P&gt;&lt;P&gt;&amp;nbsp; checksum = put(md5(strip(compress(catx(&amp;amp;labkeys),,'c'))), hex20.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found it helpful to compress out control characters, forget why at this point&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was using this to create a composite key to be used to join or compare datasets, It&amp;nbsp;has proven quite reliable until I discovered just this week that two datasets may have the same variable names, labels and values but if the length is different in any of the variables the checksum values will be different. &amp;nbsp;That kind of blew things up. &amp;nbsp;I was looking around today and came on this post about a new SHA256 function available in SAS 9.4 M1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2014/01/18/sha256-function-sas94/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2014/01/18/sha256-function-sas94/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2017 18:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Hashes-Checksums-and-all-the-rest/m-p/385440#M92193</guid>
      <dc:creator>lights</dc:creator>
      <dc:date>2017-08-03T18:53:41Z</dc:date>
    </item>
  </channel>
</rss>

