<?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: Merge step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132519#M26987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By throwing away the rest of the number.&amp;nbsp; If you try to put 8 bytes of data into 3 bytes of storage something gets lost.&lt;/P&gt;&lt;P&gt;Try this little example using the value 40426.&amp;nbsp; You can see that when the three byte value is read back in the '40'x in the 4th byte is now '00'x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; length len8 8 len3 3 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; len8=40426;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; len3=len8;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; set x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; put (len8 len8 len3 len3) ( = z5. +1 = hex16. /);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;len8=40426&amp;nbsp; len8=40E3BD4000000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;len3=40424&amp;nbsp; len3=40E3BD0000000000&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Mar 2013 02:16:25 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-03-12T02:16:25Z</dc:date>
    <item>
      <title>Merge step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132516#M26984</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 running the below merge statement for two files--which are attached. When I run the statement, the values for CourtJurisdiction from each file are missrepresented in the merged file for both. In the underlying files, the value for NYS is 40426 and the value for NYC is 23213. In the merged file, the NYS is 40424 and the value for NYC is 23212.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot seem to figure out why this is happening. There are many other files in this merge statement, but I just enclosed two for this example. There are also several processes that run before this statement. If anyone has any ideas, please let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data overviewCourtJur2;&lt;/P&gt;&lt;P&gt;length County $ 50 Year 3 Filing $ 30 FilingType $ 30 AgeRange $ 30 CourtJurisdiction 3; &lt;/P&gt;&lt;P&gt;merge &lt;/P&gt;&lt;P&gt;s0FirstNysAllAge2006&lt;/P&gt;&lt;P&gt;S0FIRSTNYCALLAGE2006;&lt;/P&gt;&lt;P&gt;by County Year Filing FilingType AgeRange;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 21:35:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132516#M26984</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-03-11T21:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Merge step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132517#M26985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You cannot store values of the size you are showing in 3 byte floating point.&amp;nbsp; In general it is never a good idea to use numeric variables less that the default length 8.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 21:50:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132517#M26985</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-03-11T21:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Merge step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132518#M26986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Data_null&lt;/P&gt;&lt;P&gt;That is fine and thanks, but how would that change the values like it is doing above?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 01:43:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132518#M26986</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-03-12T01:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Merge step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132519#M26987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By throwing away the rest of the number.&amp;nbsp; If you try to put 8 bytes of data into 3 bytes of storage something gets lost.&lt;/P&gt;&lt;P&gt;Try this little example using the value 40426.&amp;nbsp; You can see that when the three byte value is read back in the '40'x in the 4th byte is now '00'x.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; length len8 8 len3 3 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; len8=40426;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; len3=len8;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; set x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; put (len8 len8 len3 len3) ( = z5. +1 = hex16. /);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;len8=40426&amp;nbsp; len8=40E3BD4000000000&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;len3=40424&amp;nbsp; len3=40E3BD0000000000&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 02:16:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132519#M26987</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-03-12T02:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Merge step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132520#M26988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What Tom said.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS even has a function so you check it in a data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;20&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data _null_;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;21&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; len8=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;40426&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;22&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do l=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;8&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; to &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; by -&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;23&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&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; lenl = trunc(len8,l);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;24&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&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; put l= (lenl lenl ) ( = &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;z5.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; +&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;hex16.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; /);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;25&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&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; end;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;26&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;l=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;8&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; lenl=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;40426&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; lenl=40E3BD4000000000&lt;BR /&gt;l=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;7&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; lenl=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;40426&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; lenl=40E3BD4000000000&lt;BR /&gt;l=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;6&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; lenl=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;40426&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; lenl=40E3BD4000000000&lt;BR /&gt;l=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;5&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; lenl=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;40426&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; lenl=40E3BD4000000000&lt;BR /&gt;l=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;4&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; lenl=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;40426&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; lenl=40E3BD4000000000&lt;BR /&gt;l=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; lenl=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;40424&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp; lenl=40E3BD0000000000&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 10:58:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132520#M26988</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-03-12T10:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Merge step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132521#M26989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I got it. And thanks for examples. I just re-ran it using 8 bytes and it works fine. Thank you both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 12:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Merge-step/m-p/132521#M26989</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2013-03-12T12:26:32Z</dc:date>
    </item>
  </channel>
</rss>

