<?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: DO Loop and ARRAY in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/429300#M106025</link>
    <description>&lt;P&gt;That was accomplished in the previous code with:&lt;/P&gt;
&lt;PRE&gt;      or (dxmslivedis(i)=:'582')
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jan 2018 22:16:45 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2018-01-19T22:16:45Z</dc:date>
    <item>
      <title>DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428956#M105917</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to create one variable (&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;liverdis&lt;/FONT&gt;)&lt;/SPAN&gt;using the values contained in 25 other variables (&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;dx1-dx25&lt;/FONT&gt;)&lt;/SPAN&gt;. The values are basically ICD 9 codes.&lt;/P&gt;
&lt;P&gt;I want to select some specific codes and range of codes of these ICD9s that would form this new variable.&lt;/P&gt;
&lt;P&gt;I am not quite sure how I can incorporate the range of these ICD9s in one single array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what I have at present- it contains i&lt;FONT color="#0000FF"&gt;ndividual specific codes -&lt;SPAN&gt;07022' '07023' '07044&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt; and the code runs just fine.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; library.CRT1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;set library.CRT1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;array dxmslivedis{&lt;STRONG&gt;25&lt;/STRONG&gt;} dx1-dx25;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;if cmiss(of dx1-dx25)=&lt;STRONG&gt;25&lt;/STRONG&gt; then call missing(liverdis);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;else do;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;do i=&lt;STRONG&gt;1&lt;/STRONG&gt; to &lt;STRONG&gt;25&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;if dxmslivedis {i} in('07022' '07023' '07044')&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;then do;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;liverdis=&lt;STRONG&gt;1&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;return;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;end;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;else liverdis=&lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;end;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;end;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But in the&amp;nbsp;above SAS code, in addition to the specific ICD 9 codes, I also want to add range of codes as this&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;U&gt;'4560'&amp;lt;=dxmslivedis&amp;lt;='4562'&amp;nbsp; or '5722'&amp;lt;=dxmslivedis&amp;lt;='5728'&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;U&gt;I tried different ways to add but then the above code doesn't run without showing errors.&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Any help/suggestions would be welcome!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Thank you!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;A&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 23:03:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428956#M105917</guid>
      <dc:creator>Ashwini_uci</dc:creator>
      <dc:date>2018-01-18T23:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428958#M105918</link>
      <description>&lt;P&gt;see if this works&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data library.CRT1;

set library.CRT1;

array dxmslivedis{25} dx1-dx25;

if cmiss(of dx1-dx25)=25 then call missing(liverdis);

else do;

	do i=1 to 25;

	if dxmslivedis {i} in('07022' '07023' '07044')then 
		do;
			liverdis=1;
			leave;
		end;
	else liverdis=0;

	end;

end;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jan 2018 23:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428958#M105918</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-18T23:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428960#M105919</link>
      <description>&lt;P&gt;Thank you but my question is how to add range of codes as this&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;U&gt;'4560'- '4562'&amp;nbsp; and&amp;nbsp; '5722'- 5728'&lt;/U&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;in addition to the specific ICD 9 codes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 23:17:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428960#M105919</guid>
      <dc:creator>Ashwini_uci</dc:creator>
      <dc:date>2018-01-18T23:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428963#M105920</link>
      <description>&lt;P&gt;Oh sorry, which variable has those 9 codes. Can you show a sample of your dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, show a sample of your WANT&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 23:22:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428963#M105920</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-18T23:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428966#M105922</link>
      <description>&lt;P&gt;I'd use the following. However, be careful when with using less than/greater than when checking for a string variable:&lt;/P&gt;
&lt;PRE&gt;libname library '/folders/myfolders';
data library.crt1;
  infile datalines truncover;
  input (dx1-dx25) ($);
  datalines;
07023 09999
07044

5727
45602
09999
;

data library.CRT1;
  set library.CRT1;
  array dxmslivedis{25} dx1-dx25;
  if cmiss(of dxmslivedis(*))=25 then call missing(liverdis);
  else do;
    do i=1 to 25;
      if (dxmslivedis {i} in ('07022' '07023' '07044'))
      or ('4560'&amp;lt;=dxmslivedis(i)&amp;lt;='4562')
      or ('5722'&amp;lt;=dxmslivedis(i)&amp;lt;='5728')
      then do;
        liverdis=1;
        return;
      end;
      else liverdis=0;
    end;
  end;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 23:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428966#M105922</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-01-18T23:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428968#M105923</link>
      <description>&lt;P&gt;so the same variables used in defining the array : dx1-dx25, these are 25 variables that may contain the icd9 codes included in that range.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The variables look some thing lie below. Hope it makes sense&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="data.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/17964i2C622FE34B513C61/image-size/large?v=v2&amp;amp;px=999" role="button" title="data.jpg" alt="data.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 23:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428968#M105923</guid>
      <dc:creator>Ashwini_uci</dc:creator>
      <dc:date>2018-01-18T23:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428970#M105924</link>
      <description>&lt;P&gt;Thank you very much! It worked with no errors. I'd be careful about the string variables.&lt;/P&gt;
&lt;P&gt;Appreciate it!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ashwini&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 23:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428970#M105924</guid>
      <dc:creator>Ashwini_uci</dc:creator>
      <dc:date>2018-01-18T23:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428978#M105930</link>
      <description>&lt;P&gt;Requesting you to kindly mark art's answer and close the thread. Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 00:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428978#M105930</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-19T00:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428991#M105937</link>
      <description>&lt;P&gt;I have a quick question:&lt;/P&gt;
&lt;P&gt;In the array above, I want to define range&amp;nbsp;as &lt;FONT color="#FF0000"&gt;25300-25099&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;('25030'&amp;lt;=dxmslivedis(i)&amp;lt;='25099')&lt;/PRE&gt;
&lt;P&gt;By the very nature of ICD9 code format, the sequence will go like this - 25030,25031,.....,25040,25041,25050....25070...25099. and then the codes for next diagnosis begin&amp;nbsp;from 2501 which I&amp;nbsp;am not interested in. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;What will be the best way to define range here if I don't know the upper level code for every diagnosis that wish to code? In this particular case I happen to know the higher/upper level of range will be 25099.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I use this following sequence, not sure if it will capture all and ONLY the codes between 25030-25099?&lt;/P&gt;
&lt;PRE&gt;('25030'&amp;lt;=dxmslivedis(i)&amp;lt;'2501')&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 02:25:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428991#M105937</guid>
      <dc:creator>Ashwini_uci</dc:creator>
      <dc:date>2018-01-19T02:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428993#M105938</link>
      <description>&lt;P&gt;Also for a range including&amp;nbsp; the following codes&lt;/P&gt;
&lt;P&gt;5820,5821..58231..5824, 58281, 58289, is there a way to ask the&amp;nbsp;SAS code to return all ICD9s that start with 582?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 02:41:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428993#M105938</guid>
      <dc:creator>Ashwini_uci</dc:creator>
      <dc:date>2018-01-19T02:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428995#M105939</link>
      <description>&lt;P&gt;I'd think that the following satisfies all of your conditions, but you should test some possible exceptions just to be sure:&lt;/P&gt;
&lt;PRE&gt;libname library '/folders/myfolders';
data library.crt1;
  infile datalines truncover;
  input (dx1-dx25) ($);
  datalines;
07023 09999
07044

5727
45602
09999
58231
58289
;

data library.CRT1;
  set library.CRT1;
  array dxmslivedis{25} dx1-dx25;
  if cmiss(of dxmslivedis(*))=25 then call missing(liverdis);
  else do;
    do i=1 to 25;
      if (dxmslivedis {i} in ('07022' '07023' '07044'))
      or ('4560'&amp;lt;=dxmslivedis(i)&amp;lt;='4562')
      or ('5722'&amp;lt;=dxmslivedis(i)&amp;lt;='5728')
      or ('25030'&amp;lt;=dxmslivedis(i)&amp;lt;='25099')
      or (dxmslivedis(i)=:'582')
      then do;
        liverdis=1;
        return;
      end;
      else liverdis=0;
    end;
  end;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 03:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/428995#M105939</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-01-19T03:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/429298#M106024</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So I want to include these codes below&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;5820,5821....58231..5824.... 58281, 58289,&amp;nbsp;&amp;nbsp;and there are quite a lot of them.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But is there any way&amp;nbsp;to ask&amp;nbsp;in your SAS code&amp;nbsp;to return all ICD9 numbers that start with &lt;FONT color="#FF0000"&gt;582 and may end up being&amp;nbsp;4 and 5 digit&lt;/FONT&gt; long numbers,&amp;nbsp; instead of including them all in the code?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt; or (dxmslivedis(i)=:'582')&lt;/PRE&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;</description>
      <pubDate>Fri, 19 Jan 2018 22:09:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/429298#M106024</guid>
      <dc:creator>Ashwini_uci</dc:creator>
      <dc:date>2018-01-19T22:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/429300#M106025</link>
      <description>&lt;P&gt;That was accomplished in the previous code with:&lt;/P&gt;
&lt;PRE&gt;      or (dxmslivedis(i)=:'582')
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 22:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/429300#M106025</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-01-19T22:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop and ARRAY</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/429304#M106028</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1890"&gt;@Ashwini_uci&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I have a quick question:&lt;/P&gt;
&lt;P&gt;In the array above, I want to define range&amp;nbsp;as &lt;FONT color="#FF0000"&gt;25300-25099&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;('25030'&amp;lt;=dxmslivedis(i)&amp;lt;='25099')&lt;/PRE&gt;
&lt;P&gt;By the very nature of ICD9 code format, the sequence will go like this - 25030,25031,.....,25040,25041,25050....25070...25099. and then the codes for next diagnosis begin&amp;nbsp;from 2501 which I&amp;nbsp;am not interested in. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;What will be the best way to define range here if I don't know the upper level code for every diagnosis that wish to code? In this particular case I happen to know the higher/upper level of range will be 25099.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I use this following sequence, not sure if it will capture all and ONLY the codes between 25030-25099?&lt;/P&gt;
&lt;PRE&gt;('25030'&amp;lt;=dxmslivedis(i)&amp;lt;'2501')&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If your comparison is happening in SAS then you can use colon modifier to limit match to shorter string.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;('250' &amp;lt;=: dx &amp;lt;=: '253')&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or if you are pushing the query into external database then use facts that spaces are less than digits and letter like Z are larger than digits.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;('250  '  &amp;lt;= dx &amp;lt;= '253ZZ')&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Of course this really won't help much with ICD9 codes for Diabetes where the fifth digit is used to distinguish between Type I and Type II diagnosis codes.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if '250' =: dx then do;
  diabetes=1;
  if substr(dx,5,1) in ('1','3') then type1=1
  else if substr(dx,5,1) in ('0','2') then type2=1;
end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 22:45:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-Loop-and-ARRAY/m-p/429304#M106028</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-01-19T22:45:48Z</dc:date>
    </item>
  </channel>
</rss>

