<?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 checking whether values in a column match the first 3 numbers of several other numbers in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186583#M47387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list of codes that pull corresponding numbers from a dataset, which I pasted from some sql code so I guess the format isn't important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;((med_code between '295'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'29999'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '311'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'31499'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '301'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'30199'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '308'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'30999'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '3004'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'30049'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '3003'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'30039'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have an input that has fields like (about 7000 observations) called pat_details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pat_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; discharge_date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; med_code&lt;/P&gt;&lt;P&gt;AAA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/02/2012&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29280&lt;/P&gt;&lt;P&gt;AAB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02/04/2012&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29800&lt;/P&gt;&lt;P&gt;AAC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05/20/2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2925&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to check whether any of the med_codes which are phrased in the logic of between two ranges matches the first 3 numbers of med_code column in the dataset and if not, which ones don't match.&amp;nbsp; I have no idea how to approach this.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Jan 2015 16:39:02 GMT</pubDate>
    <dc:creator>pinkyc</dc:creator>
    <dc:date>2015-01-16T16:39:02Z</dc:date>
    <item>
      <title>checking whether values in a column match the first 3 numbers of several other numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186583#M47387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list of codes that pull corresponding numbers from a dataset, which I pasted from some sql code so I guess the format isn't important.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;((med_code between '295'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'29999'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '311'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'31499'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '301'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'30199'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '308'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'30999'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '3004'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'30049'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) or&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;(med_code between '3003'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; and &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'30039'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;) );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have an input that has fields like (about 7000 observations) called pat_details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pat_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; discharge_date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; med_code&lt;/P&gt;&lt;P&gt;AAA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 01/02/2012&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29280&lt;/P&gt;&lt;P&gt;AAB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02/04/2012&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 29800&lt;/P&gt;&lt;P&gt;AAC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05/20/2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2925&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to check whether any of the med_codes which are phrased in the logic of between two ranges matches the first 3 numbers of med_code column in the dataset and if not, which ones don't match.&amp;nbsp; I have no idea how to approach this.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 16:39:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186583#M47387</guid>
      <dc:creator>pinkyc</dc:creator>
      <dc:date>2015-01-16T16:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: checking whether values in a column match the first 3 numbers of several other numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186584#M47388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you want the output to look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 17:18:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186584#M47388</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-01-16T17:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: checking whether values in a column match the first 3 numbers of several other numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186585#M47389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since I'm not sure how to go about this, would it be easier if there were two index columns?&lt;/P&gt;&lt;P&gt;Like if the med_code col doesn't match, then match = 0 else match = 1.&amp;nbsp; Then I can do another step and just extract the match = 0 and match = 1 observations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 17:57:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186585#M47389</guid>
      <dc:creator>pinkyc</dc:creator>
      <dc:date>2015-01-16T17:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: checking whether values in a column match the first 3 numbers of several other numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186586#M47390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming your med_code in the dataset is character,&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Substr function - if trim(left(right(med_code,1,3) eq '&amp;lt;insert med code&amp;gt;'&amp;nbsp; then &amp;lt;some other logic&amp;gt;. If you are particular just aboutthe first 3 characters, then use substr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Use the index function (index searches the combination of characters anywhere within a given string)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212242.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212242.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now there are other considerations - How are you getting the list of codes from the SQL logic to compare against the dataset field? Once you are clear about the format of both data sources, the logic outlined above can be used to compare and the output can be redirected to different datasets based on your particular requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to compare the two values in each AND expression as well as all values falling within the range. Use&amp;nbsp; PROC format to&amp;nbsp; say&amp;nbsp; &lt;/P&gt;&lt;P&gt;295 - 299 = M&amp;nbsp; (Using only first 3 characters of each value)&lt;/P&gt;&lt;P&gt;311 - &lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;31499 = M&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;other = NM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;M is for match, NM for no match.&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;Then use the substr on the first 3 characters of med_code on the dataset and convert it to either M or NM using the format you just created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;Remember these are pointers for approach, there are other things you might have to insert to get exactly what you want. (like format of output, renaming variables etc.)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 18:06:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186586#M47390</guid>
      <dc:creator>PoornimaRavishankar</dc:creator>
      <dc:date>2015-01-16T18:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: checking whether values in a column match the first 3 numbers of several other numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186587#M47391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I realize you said the first three digits but your last two codes are actually a four digit match?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, consider a format where you can list the ranges. You'll need to expand the proc format ranges, I didn't want to type it all out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; have;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #0433ff;"&gt;format&lt;/SPAN&gt; pat_id &lt;SPAN style="color: #009193;"&gt;$3.&lt;/SPAN&gt; discharge_date &lt;SPAN style="color: #009193;"&gt;date9.&lt;/SPAN&gt; med_code &lt;SPAN style="color: #009193;"&gt;$5.&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #0433ff;"&gt;input&lt;/SPAN&gt; Pat_ID&amp;nbsp; $&amp;nbsp;&amp;nbsp; discharge_date &lt;SPAN style="color: #009193;"&gt;mmddyy10.&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; med_code $;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #0433ff;"&gt;cards&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;AAA 01/02/2012 29280&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;AAB 02/04/2012 29800&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;AAC 05/20/2011 2925&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;format&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #0433ff;"&gt;value&lt;/SPAN&gt; $ match_fmt&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #942193;"&gt;'295'&lt;SPAN style="color: #000000;"&gt;-&lt;/SPAN&gt;'29999'&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #942193;"&gt;'311'&lt;SPAN style="color: #000000;"&gt;-&lt;/SPAN&gt;'31499'&lt;SPAN style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #942193;"&gt;'3003'&lt;SPAN style="color: #000000;"&gt;-&lt;/SPAN&gt;'30039'&lt;SPAN style="color: #000000;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;other = &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt; want;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;&lt;SPAN style="color: #0433ff;"&gt;set&lt;/SPAN&gt; have;&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New';"&gt;match=put(med_code, &lt;SPAN style="color: #009193;"&gt;$match_fmt.&lt;/SPAN&gt;);&lt;/P&gt;&lt;P style="font-size: 10px; font-family: 'Courier New'; color: #011993;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 18:16:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186587#M47391</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-01-16T18:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: checking whether values in a column match the first 3 numbers of several other numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186588#M47392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes the codes in the med_code column may have 4 or 5 digits.&amp;nbsp; But I am asked to compare only the first three digits to the list. &lt;/P&gt;&lt;P&gt;Thank you I will try that and get back to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 18:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186588#M47392</guid>
      <dc:creator>pinkyc</dc:creator>
      <dc:date>2015-01-16T18:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: checking whether values in a column match the first 3 numbers of several other numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186589#M47393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i'm new to SAS programming and &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I have a very similar problem to solve. The difference is that in my case the list of codes to be inserted at the match_fmt is stored in 2 different columns on a specific database. How can I make SAS to recognize the values on both columns as being the inner and outer limits &lt;/SPAN&gt;instead&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; of hard coding them?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2015 21:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186589#M47393</guid>
      <dc:creator>LucasM</dc:creator>
      <dc:date>2015-08-25T21:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: checking whether values in a column match the first 3 numbers of several other numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186590#M47394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should post a new question and link to this as reference if required.&lt;/P&gt;&lt;P&gt;Please include some sample data, input and output to help clarify your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 17:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/checking-whether-values-in-a-column-match-the-first-3-numbers-of/m-p/186590#M47394</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-08-27T17:41:34Z</dc:date>
    </item>
  </channel>
</rss>

