<?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: Strange error with Proc Distance in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107420#M29877</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PG,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an interesting twist--if you have only 1 BY group, the code works.&amp;nbsp; Columns are named with an underscore before the year, e.g., _2008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 15 Jul 2012 14:37:04 GMT</pubDate>
    <dc:creator>mfisher</dc:creator>
    <dc:date>2012-07-15T14:37:04Z</dc:date>
    <item>
      <title>Strange error with Proc Distance</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107418#M29875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Proc distance allows the use of an ID statement with a BY statement, as long as ID is character and they are sorted in the same order within BY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached code "Distance with character year as ID" works fine (year is prefixed with Y).&lt;/P&gt;&lt;P&gt;The second attached code,&amp;nbsp; "Distance with numeric year as ID" (no prefix, but year is input as character) returns the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"ERROR: The ID variable must have the same values in the same order in each BY group."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Any ideas why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2012 23:55:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107418#M29875</guid>
      <dc:creator>mfisher</dc:creator>
      <dc:date>2012-07-14T23:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error with Proc Distance</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107419#M29876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I noticed the same thing. I guess this restriction simplifies the generation of column names in the distance matrix and makes the names more previsible. The error message could be a tad clearer though.&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2012 01:03:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107419#M29876</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-15T01:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error with Proc Distance</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107420#M29877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PG,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an interesting twist--if you have only 1 BY group, the code works.&amp;nbsp; Columns are named with an underscore before the year, e.g., _2008.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2012 14:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107420#M29877</guid>
      <dc:creator>mfisher</dc:creator>
      <dc:date>2012-07-15T14:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error with Proc Distance</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107421#M29878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very interesting indeed. So, what might have been construed as a &lt;EM&gt;feature&lt;/EM&gt; is thus an error, since it makes the procedure behaviour inconsistent. Your finding might explain the error message as well. I think that the DISTANCE procedure, when it gets to the second BY-group, checks the ID values against the variable names established during the first BY-group, and finds that they don't match (i.e. '2004' against '_2004'), thus the message "The ID variable must have the same values in the same order in each BY group." Seems like they simply omitted to translate ID values into variable names before doing the comparison.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2012 16:11:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107421#M29878</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-15T16:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error with Proc Distance</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107422#M29879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shall I formally report this to SAS, or is posting here good enough?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2012 20:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107422#M29879</guid>
      <dc:creator>mfisher</dc:creator>
      <dc:date>2012-07-15T20:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Strange error with Proc Distance</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107423#M29880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I know, you must report the bug to Tech Support, but you can refer them to this discussion for the details. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2012 20:33:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Strange-error-with-Proc-Distance/m-p/107423#M29880</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-15T20:33:28Z</dc:date>
    </item>
  </channel>
</rss>

