<?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: Multiple arrays in same data step in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiple-arrays-in-same-data-step/m-p/323450#M71694</link>
    <description>&lt;P&gt;Yes, your DO loops should not be nested.&amp;nbsp; Moving a few END statements would work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data asthma2.asthma_only;&lt;BR /&gt;set asthma2.fyall_EXCL_F;&lt;BR /&gt;asthma=0;&lt;BR /&gt;array&amp;nbsp; dx(*)secondarydiagnosis2-secondarydiagnosis20;&lt;BR /&gt;do i= 1 to dim(dx);&lt;BR /&gt;if dx(i) =: '493' then asthma=1;&lt;/P&gt;
&lt;P&gt;end;&lt;BR /&gt;array proc(*) procedure1-procedure20;&lt;BR /&gt;if asthma=0 then do i=1 to dim(proc);&lt;BR /&gt;if proc(i)=:'493' then asthma=1;&lt;/P&gt;
&lt;P&gt;end;&lt;BR /&gt;array HCPCS(*) ProcedureHCPCS_1-ProcedureHCPCS_13;&lt;BR /&gt;if asthma=0 then do i=1 to dim(HCPCS);&lt;BR /&gt;if hcpcs(i)=:'493' then asthma=1;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2017 19:24:53 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-01-09T19:24:53Z</dc:date>
    <item>
      <title>Multiple arrays in same data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-arrays-in-same-data-step/m-p/323441#M71689</link>
      <description>&lt;P&gt;Hi!&amp;nbsp; I'm looking for help with this array.&amp;nbsp; I want to check multiple variables (Secondarydiagnosis1-20, Procedure1-20, and ProcedureHCPCS_1-13) &amp;nbsp; for a number starting with '493'.&amp;nbsp; If it begins with '493' then new variable asthma=1.&amp;nbsp; I submitted this code but it is taking a long time to process, so I'm sure there is an error!&amp;nbsp; Help is appreciated!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data asthma2.asthma_only;&lt;BR /&gt;set asthma2.fyall_EXCL_F;&lt;BR /&gt;asthma=0;&lt;BR /&gt;array&amp;nbsp; dx(*)secondarydiagnosis2-secondarydiagnosis20;&lt;BR /&gt;do i= 1 to dim(dx);&lt;BR /&gt;if dx(i) =: '493' then asthma=1;&lt;BR /&gt;array proc(*) procedure1-procedure20;&lt;BR /&gt;do i=1 to dim(proc);&lt;BR /&gt;if proc(i)=:'493' then asthma=1;&lt;BR /&gt;array HCPCS(*) ProcedureHCPCS_1-ProcedureHCPCS_13;&lt;BR /&gt;do i=1 to dim(HCPCS);&lt;BR /&gt;if hcpcs(i)=:'493' then asthma=1;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 19:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-arrays-in-same-data-step/m-p/323441#M71689</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2017-01-09T19:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple arrays in same data step</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-arrays-in-same-data-step/m-p/323450#M71694</link>
      <description>&lt;P&gt;Yes, your DO loops should not be nested.&amp;nbsp; Moving a few END statements would work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data asthma2.asthma_only;&lt;BR /&gt;set asthma2.fyall_EXCL_F;&lt;BR /&gt;asthma=0;&lt;BR /&gt;array&amp;nbsp; dx(*)secondarydiagnosis2-secondarydiagnosis20;&lt;BR /&gt;do i= 1 to dim(dx);&lt;BR /&gt;if dx(i) =: '493' then asthma=1;&lt;/P&gt;
&lt;P&gt;end;&lt;BR /&gt;array proc(*) procedure1-procedure20;&lt;BR /&gt;if asthma=0 then do i=1 to dim(proc);&lt;BR /&gt;if proc(i)=:'493' then asthma=1;&lt;/P&gt;
&lt;P&gt;end;&lt;BR /&gt;array HCPCS(*) ProcedureHCPCS_1-ProcedureHCPCS_13;&lt;BR /&gt;if asthma=0 then do i=1 to dim(HCPCS);&lt;BR /&gt;if hcpcs(i)=:'493' then asthma=1;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 19:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-arrays-in-same-data-step/m-p/323450#M71694</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-01-09T19:24:53Z</dc:date>
    </item>
  </channel>
</rss>

