<?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, spedis, do loop, or macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285818#M58507</link>
    <description>&lt;P&gt;thank you&lt;/P&gt;
&lt;P&gt;my original dataset contains values like A2.89, K299.47, 034.568,&lt;/P&gt;
&lt;P&gt;They do not quite match the reference dataset, which already remove "."&lt;/P&gt;
&lt;P&gt;i need some more flexible ways, which means, do I have to modify the value of reference dataset&amp;nbsp;&amp;nbsp;and my have dataset first, then use&amp;nbsp;&amp;nbsp;CNTLIN?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jul 2016 14:12:09 GMT</pubDate>
    <dc:creator>Bal23</dc:creator>
    <dc:date>2016-07-20T14:12:09Z</dc:date>
    <item>
      <title>merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285615#M58431</link>
      <description>&lt;P&gt;I have a large dataset, contains values either icd9 , icd10, or something else. I can use merge to a reference dataset to see whether it is icd9 or icd10. But I am thinking whether there are some other ways, using, strip, trim, or substr, index, or spedis function.&lt;/P&gt;
&lt;P&gt;If I use spedis function, I can&amp;nbsp;first merge it to icd9 reference list and icd10 reference list. Then I compare the points I get, to judge whether it is icd9 or icd10. Because there are lots of values neither icd9 nor icd10, that needs some additional work, means that I have to merge back to the original large dataset, and the duplicate record is somewhat hard to remove; or at least time consuming&lt;/P&gt;
&lt;P&gt;I want to know if&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Can I skip merge, but use do loop, or macro, useIf strip(string) = ‘ ‘ ( the value is on another dataset, icd10 code, reference dataset, about 69823 codes) then result =”10”&lt;/LI&gt;
&lt;LI&gt;If strip(string) = ‘ ‘ (but the value is on another dataset, icd9 code, reference dataset, about 14025 codes) then result =”9”&lt;/LI&gt;
&lt;LI&gt;Or any other more efficient way to do, without merge&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 19:23:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285615#M58431</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-19T19:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285618#M58432</link>
      <description>You might try loading your lookup tables of ICD9 codes and ICD10 codes into two different hash tables.  Then you can use hash table lookups.  One benefit of this approach is don't have to sort the data like you would with a merge.  If you want to see some sample code, I would suggest you post a small amount of sample data.</description>
      <pubDate>Tue, 19 Jul 2016 20:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285618#M58432</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-07-19T20:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285619#M58433</link>
      <description>&lt;P&gt;#3 Use a hash object.&amp;nbsp; Load your ICD9 and ICD10 reference tables&amp;nbsp;into one hash with lookup values of 'ICD9' and 'ICD10' respectively.&amp;nbsp;&amp;nbsp;See if the code value in each row of your data is in the hash&amp;nbsp;and retrieve either the 'ICD9 ' or 'ICD10' from&amp;nbsp;that hit.&amp;nbsp; If you don't get a hit, assign the value 'Other'.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 20:03:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285619#M58433</guid>
      <dc:creator>Ludwig61</dc:creator>
      <dc:date>2016-07-19T20:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285623#M58435</link>
      <description>&lt;P&gt;attached as a sample dataset&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 20:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285623#M58435</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-19T20:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285624#M58436</link>
      <description>&lt;P&gt;Sorry I do not know anything ab hash object. I have provided my smalle sample data. Would you please provide sas code? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 20:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285624#M58436</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-19T20:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285627#M58438</link>
      <description>&lt;P&gt;Pretty sure I suggested this earlier and I think it's probably the simplest in many ways. Create two formats, you can do that from reference tables, look up CNTLIN. Add in an other for not found formats.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then the code can be:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if put(code, icd9_fmt.) ne 'Other' then code_type='ICD9';&lt;/P&gt;
&lt;P&gt;else if put(code, icd10_fmt.) ne 'Other' then code_type='ICD10';&lt;/P&gt;
&lt;P&gt;else code_type='Other';&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 20:39:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285627#M58438</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-19T20:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285633#M58442</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40773"&gt;@Bal23&lt;/a&gt;, please post a small amout of sample data as text in your question (preferably a data step with a cards statement).&amp;nbsp; I don't trust Excel files (too many viruses / bad data conversions).&amp;nbsp; You could post perhaps three small datasets: 10 records of sample data, 5 records of icd-9 lookups, and 5 records of icd-10 lookups.&amp;nbsp; I think that should be enough for people to work with.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The exact matches should be easy to find (with hash approach or &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;'s format approach, which may be easier for you if you haven't played with hashes before).&amp;nbsp; If you want fuzzy matching of the sort&amp;nbsp;that can be done with SPEDIS function, that will take more thought.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 20:46:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285633#M58442</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-07-19T20:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285639#M58447</link>
      <description>&lt;PRE style="width: 555px; height: 176px;"&gt;&lt;CODE class=" language-sas"&gt;data have; length id icd date 10; format icd dollar 8.; &lt;BR /&gt;input id date icd; datalines; id date icd &lt;BR /&gt;123 101510 a09&lt;BR /&gt;  234 51812 k09 &lt;BR /&gt;256 61912 h980 &lt;BR /&gt;345 120213 98 &lt;BR /&gt;534 12310 overw &lt;BR /&gt;2133 040512 e03&lt;BR /&gt;526 32116 underw&lt;BR /&gt; 21 10213 e8808&lt;BR /&gt; 56 20115 v342 &lt;BR /&gt;23   30314 345&lt;BR /&gt;41  020215 278&lt;BR /&gt;; run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;data icd-10;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;input icd10 longdes;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="identifier"&gt;&lt;A href="http://www.icd10data.com/ICD10CM/Codes/E00-E89/E00-E07/E00-" target="_blank"&gt;E00&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; Congenital iodine-deficiency syndrome&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="identifier"&gt;&lt;A href="http://www.icd10data.com/ICD10CM/Codes/E00-E89/E00-E07/E01-" target="_blank"&gt;E01&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; Iodine-deficiency related thyroid disorders and allied conditions&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="identifier"&gt;&lt;A href="http://www.icd10data.com/ICD10CM/Codes/E00-E89/E00-E07/E02-" target="_blank"&gt;E02&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; Subclinical iodine-deficiency hypothyroidism&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="identifier"&gt;&lt;A href="http://www.icd10data.com/ICD10CM/Codes/E00-E89/E00-E07/E03-" target="_blank"&gt;E03&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; Other hypothyroidism&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="identifier"&gt;&lt;A href="http://www.icd10data.com/ICD10CM/Codes/E00-E89/E00-E07/E04-" target="_blank"&gt;E04&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; Other nontoxic goiter&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="identifier"&gt;&lt;A href="http://www.icd10data.com/ICD10CM/Codes/E00-E89/E00-E07/E05-" target="_blank"&gt;E05&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; Thyrotoxicosis [hyperthyroidism]&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="identifier"&gt;&lt;A href="http://www.icd10data.com/ICD10CM/Codes/E00-E89/E00-E07/E06-" target="_blank"&gt;E06&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; Thyroiditis&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="identifier"&gt;&lt;A href="http://www.icd10data.com/ICD10CM/Codes/A00-B99/A00-A09/A09-" target="_blank"&gt;A09&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; Infectious gastroenteritis and colitis, unspecified&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="identifier"&gt;H&lt;A href="http://www.icd10data.com/ICD10CM/Codes/I00-I99/I95-I99/I99-" target="_blank"&gt;99&lt;/A&gt;&lt;/SPAN&gt;&amp;nbsp; Other and unspecified disorders of circulatory system&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data icd9 longdes;&lt;/P&gt;
&lt;P&gt;278&amp;nbsp; evans sym&lt;/P&gt;
&lt;P&gt;0345 inflam&lt;/P&gt;
&lt;P&gt;0098 colon dis&lt;/P&gt;
&lt;P&gt;v32&amp;nbsp; hand injury&lt;/P&gt;
&lt;P&gt;v54&amp;nbsp; rib fracture&lt;/P&gt;
&lt;P&gt;e33&amp;nbsp; eye dise&lt;/P&gt;
&lt;P&gt;e03&amp;nbsp; unspecific dis&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;e03 could be either icd9 or 10, some are neither icd9 nor icd10&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 21:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285639#M58447</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-19T21:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285641#M58448</link>
      <description>&lt;P&gt;sorry Reeza, I do not understand it. I did check cntlin online, but still have no clue on how to use it.&lt;/P&gt;
&lt;P&gt;I have provided my sample dataset, as well as two reference dataset, would you please provide more details? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 21:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285641#M58448</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-19T21:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285643#M58449</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using a dataset to create a format is explained in&amp;nbsp;&lt;A href="http://www2.sas.com/proceedings/forum2007/068-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/068-2007.pdf&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 21:19:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285643#M58449</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2016-07-19T21:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285669#M58453</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40773"&gt;@Bal23&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;sorry Reeza, I do not understand it. I did check cntlin online, but still have no clue on how to use it.&lt;/P&gt;
&lt;P&gt;I have provided my sample dataset, as well as two reference dataset, would you please provide more details? Thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Where are you checking? I highly recommend searching for papers on lexjansen.com + keywords introduction/beginner which will provide you with a lot of resources.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 23:28:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285669#M58453</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-19T23:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285792#M58497</link>
      <description>&lt;P&gt;I think &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; is right that a PROC FORMAT approach will be easiest.&amp;nbsp;&amp;nbsp;Formats allow simple look-ups like you need.&amp;nbsp; And if you are working with ICD9 codes, you probably already have&amp;nbsp;formats that labels them all (or if you don't, it's worth building the formats).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is a small example of using formats to look up each code in HAVE to assign it a label per ICD9, and a label per ICD10.&amp;nbsp; Of course you can add logic to catch codes that have both ICD9 and ICD10 labels, or neither.&amp;nbsp; But it's a starting point.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to build the formats from existing data, then PROC FORMAT CNTLIN is the way to go (not shown below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data have; 
input id $1. icd : $3.; 
cards;
1 E01
2 E02
3 E03
4 E33
5 E99
; 
run;

proc format;
  value $ICDnine
    "E33"="eye dise"
    "E03"="unspecific dis"
    other=" "
  ;
  value $ICDten
    "E01"="Iodine-deficiency related thyroid disorders and allied conditions"
    "E02"="Subclinical iodine-deficiency hypothyroidism"
    "E03"="Other hypothyroidism"
    other=" "
  ;
run;

data want; 
  set have;
  length ICD9text $100 ICD10text $100;
  ICD9text=put(icd,$ICDnine.);
  ICD10text=put(icd,$ICDten.);
  put (icd icd9text icd10text)(=);
run;&lt;/PRE&gt;
&lt;P&gt;Returns in log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;199  data want;
200    set have;
201    length ICD9text $100 ICD10text $100;
202    ICD9text=put(icd,$ICDnine.);
203    ICD10text=put(icd,$ICDten.);
204    put (icd icd9text icd10text)(=);
205  run;

icd=E01 ICD9text=  ICD10text=Iodine-deficiency related thyroid disorders and allied conditions
icd=E02 ICD9text=  ICD10text=Subclinical iodine-deficiency hypothyroidism
icd=E03 ICD9text=unspecific dis ICD10text=Other hypothyroidism
icd=E33 ICD9text=eye dise ICD10text=
icd=E99 ICD9text=  ICD10text=
NOTE: There were 5 observations read from the data set WORK.HAVE.
NOTE: The data set WORK.WANT has 5 observations and 4 variables.
&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285792#M58497</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-07-20T12:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285813#M58506</link>
      <description>&lt;P&gt;how to do with hash tables?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:52:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285813#M58506</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-20T13:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285818#M58507</link>
      <description>&lt;P&gt;thank you&lt;/P&gt;
&lt;P&gt;my original dataset contains values like A2.89, K299.47, 034.568,&lt;/P&gt;
&lt;P&gt;They do not quite match the reference dataset, which already remove "."&lt;/P&gt;
&lt;P&gt;i need some more flexible ways, which means, do I have to modify the value of reference dataset&amp;nbsp;&amp;nbsp;and my have dataset first, then use&amp;nbsp;&amp;nbsp;CNTLIN?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:12:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285818#M58507</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-20T14:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285819#M58508</link>
      <description>&lt;P&gt;Yes, for the PROC FORMAT approach (and hash approach) the values in your HAVE data must match the values defined in the format (or hash table key) exactly.&amp;nbsp;So you could clean the values to make them consistent.&amp;nbsp; Or if you want FUZZY matching, would need a&amp;nbsp;different approach.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:17:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285819#M58508</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2016-07-20T14:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285828#M58511</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40773"&gt;@Bal23&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;thank you&lt;/P&gt;
&lt;P&gt;my original dataset contains values like A2.89, K299.47, 034.568,&lt;/P&gt;
&lt;P&gt;They do not quite match the reference dataset, which already remove "."&lt;/P&gt;
&lt;P&gt;i need some more flexible ways, which means, do I have to modify the value of reference dataset&amp;nbsp;&amp;nbsp;and my have dataset first, then use&amp;nbsp;&amp;nbsp;CNTLIN?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I do a &lt;STRONG&gt;very&lt;/STRONG&gt; small amount of work with ICD codes but your comment about "already remove "."" makes me very concerned as those decimals are very significant and a remember some where it is possibly to have A2.8 and A28. type structures. I would question the decision about creating any type of reference table without the decimals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And for formats I might also recommend, though it is more work, to investigate MULTILABEL formats. When used with the procedures that support them it makes reports of the form "I want all injuries to feet with a total AND the break out by subcategories of foot injuries as well" easier.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285828#M58511</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-20T14:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285834#M58513</link>
      <description>&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;your are right&lt;/P&gt;
&lt;P&gt;for the current project, i only need to tell whether it is icd9 or 10, so A2.8, OR A28.9 are both icd-10, therefore this is not my concern for this&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:47:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285834#M58513</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-20T14:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285837#M58515</link>
      <description>&lt;P&gt;Thanks. I did look at a paper, PROC FORMAT: USE OF THE CNTLIN OPTION, by Karuna&lt;/P&gt;
&lt;P&gt;the author explained the duplicate records, So the id SHOULD BE unique in order for the format procedure to succesffully create a format for that variable&lt;/P&gt;
&lt;P&gt;for my project, there are duplicate records and I cannot remove, I need to keep them&lt;/P&gt;
&lt;P&gt;any advice or more detailed info on this solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285837#M58515</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-20T14:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285838#M58516</link>
      <description>&lt;P&gt;Thanks. I did look at a paper, PROC FORMAT: USE OF THE CNTLIN OPTION, by Karuna&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the author explained the duplicate records, So the id SHOULD BE unique in order for the format procedure to succesffully create a format&lt;/P&gt;
&lt;P&gt;for that variable&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for my project, there are duplicate records and I cannot remove, I need to keep them&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any advice or more detailed info on this solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 14:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285838#M58516</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-20T14:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: merge, spedis, do loop, or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285865#M58529</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40773"&gt;@Bal23&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thanks. I did look at a paper, PROC FORMAT: USE OF THE CNTLIN OPTION, by Karuna&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the author explained the duplicate records, So the id SHOULD BE unique in order for the format procedure to succesffully create a format&lt;/P&gt;
&lt;P&gt;for that variable&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for my project, there are duplicate records and I cannot remove, I need to keep them&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any advice or more detailed info on this solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The format is created based on your ICD9/10 reference tables. Each ICD9/10 code is unique. The format is applied to your other table and it doesn't matter how many duplicates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps you should try the solution and see if it works rather than guessing all the reasons it may not work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 16:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/merge-spedis-do-loop-or-macro/m-p/285865#M58529</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-20T16:40:48Z</dc:date>
    </item>
  </channel>
</rss>

