<?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: SAS Linkage in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249095#M46818</link>
    <description>&lt;P&gt;Without some data to work with it is hard to test any code that might work. If you can provide a few rows of input data in the form of a datastep and what the desired output might be it really helps to answer your question. Include some cases with each of the types of issues you expect to incounter such as no missing, one or two missing, all missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the approach could well depend upon whether your current values are numeric or character either by adding or reducing a step in the solution.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2016 23:28:28 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-02-09T23:28:28Z</dc:date>
    <item>
      <title>SAS Linkage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249053#M46811</link>
      <description>&lt;P&gt;I am working on a linkage and I have two datasets with numerous missing values that are coded as all 9s in both datasets. I am trying to make sure that when the linkage codes for "Var_A" that it does not label matches for those that are all 9s. I want the other variables to match where applicable without matching those missing values. The example code is below. How might I edit that to accomplish this task?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003366"&gt;proc sql;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;create table &lt;FONT color="#000000"&gt;Set_A&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;FONT color="#0000FF"&gt;as&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;select&lt;/FONT&gt;&lt;BR /&gt;a.Var_A, b.Var_A &lt;FONT color="#0000FF"&gt;as&lt;/FONT&gt; Var_A,&lt;BR /&gt;a.Var_B, b.Var_B &lt;FONT color="#0000FF"&gt;as&lt;/FONT&gt;&amp;nbsp;Var_B,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;a.Var_C, b.Var_C &lt;FONT color="#0000FF"&gt;as&lt;/FONT&gt;&amp;nbsp;Var_C&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;from&lt;/FONT&gt; File1&amp;nbsp;a, File2&amp;nbsp;b&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;where&lt;/FONT&gt; (complev(a.&lt;SPAN&gt;Var_B&lt;/SPAN&gt;, b.Var_B, 'ILN') lt 1) &lt;FONT color="#0000FF"&gt;and&lt;/FONT&gt; /*Perfect match on Var_B*/&lt;BR /&gt;(&lt;BR /&gt;( b.&lt;SPAN&gt;Var_A&lt;/SPAN&gt; =* a.&lt;SPAN&gt;Var_A&lt;/SPAN&gt; &lt;FONT color="#0000FF"&gt;and&lt;/FONT&gt; b.&lt;SPAN&gt;Var_B&lt;/SPAN&gt;&amp;nbsp;=* a.&lt;SPAN&gt;Var_B&lt;/SPAN&gt;)&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;and&lt;/FONT&gt; ((a.&lt;SPAN&gt;Var_C&lt;/SPAN&gt;=b.&lt;SPAN&gt;Var_C&lt;/SPAN&gt;))&lt;BR /&gt;);&lt;BR /&gt;&lt;FONT color="#003366"&gt;quit;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 20:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249053#M46811</guid>
      <dc:creator>chadwae</dc:creator>
      <dc:date>2016-02-09T20:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Linkage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249067#M46813</link>
      <description>&lt;P&gt;Some additional information that might help:&lt;/P&gt;
&lt;P&gt;Are all of the variables in question character, numeric or mixed?&lt;/P&gt;
&lt;P&gt;You might post a few rows of data and what you want the outcome to look like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm assuming that in this code snippet you missed adding something to the B variable names, otherwise you're likely to have unexpected results:&lt;/P&gt;
&lt;P&gt;a.Var_A, b.Var_A &lt;FONT color="#0000ff"&gt;as&lt;/FONT&gt; Var_A,&amp;nbsp; /* &amp;lt;=would try to create two variables named Var_a, did you mean b.Var_A as Var_A_b or similar?*/&lt;BR /&gt;a.Var_B, b.Var_B &lt;FONT color="#0000ff"&gt;as&lt;/FONT&gt;&amp;nbsp;Var_B,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;a.Var_C, b.Var_C &lt;FONT color="#0000ff"&gt;as&lt;/FONT&gt;&amp;nbsp;Var_C&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 21:14:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249067#M46813</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-09T21:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Linkage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249070#M46815</link>
      <description>&lt;P&gt;The variable names are hypothetical. The actual code is set up differently. The variables are mixed. I just need to know how to add in a clause that prevents matching on a value of '999999999' because that indicates a missing value and both datasets are coded the same way for the missing values. I have to use this variable as a match variable, but all of the missings will mess up my results if I can't figure out how to avoid matching on teh missing values.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 21:31:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249070#M46815</guid>
      <dc:creator>chadwae</dc:creator>
      <dc:date>2016-02-09T21:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Linkage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249095#M46818</link>
      <description>&lt;P&gt;Without some data to work with it is hard to test any code that might work. If you can provide a few rows of input data in the form of a datastep and what the desired output might be it really helps to answer your question. Include some cases with each of the types of issues you expect to incounter such as no missing, one or two missing, all missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the approach could well depend upon whether your current values are numeric or character either by adding or reducing a step in the solution.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2016 23:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249095#M46818</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-02-09T23:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Linkage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249097#M46819</link>
      <description>I unfortunately can't include any data. The information I'm working with is confidential which is why that's not the exact code. I just need an idea of some syntax that might work. Just something to point me in the direction of adding an exception so it won't try and match on the unknowns which is '999999999'. I want to match on everything except those.&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Feb 2016 23:42:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249097#M46819</guid>
      <dc:creator>chadwae</dc:creator>
      <dc:date>2016-02-09T23:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Linkage</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249098#M46820</link>
      <description>The variables are mostly character. I know how to do conversions if I need to.</description>
      <pubDate>Tue, 09 Feb 2016 23:42:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Linkage/m-p/249098#M46820</guid>
      <dc:creator>chadwae</dc:creator>
      <dc:date>2016-02-09T23:42:51Z</dc:date>
    </item>
  </channel>
</rss>

