<?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: How to Control Starting Point of Do Loop Based on Results of Other Field? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551843#M153378</link>
    <description>&lt;P&gt;If you just want to find cases with 2 or more codes in the same group then keep count of how many you find.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  set test_grp;
  array dx dcde1-dcde4;
  found=0;
  do i = 1 to dim(dx) until (found&amp;gt;=2);
    found +  ("Y60" &amp;lt;=: dx[i] &amp;lt;=: "Y84");
  end;
  if found &amp;gt;= 2 then output;
  drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 17 Apr 2019 18:27:44 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-04-17T18:27:44Z</dc:date>
    <item>
      <title>How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551812#M153361</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have data formatted as wide and I want to loop through to find a code from the same range twice.&amp;nbsp; So I want the second do loop to start 1 after finding the other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, if the first code is found at occurrence 3 of 25&amp;nbsp; I want the next do loop to start at 4 and go to 25.&amp;nbsp; But they won't all be in the same occurrence so I want to be able to use the results of the first occurrence dynamically.&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 17:26:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551812#M153361</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2019-04-17T17:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551814#M153363</link>
      <description>&lt;P&gt;Just use a variable for the lower end of the DO loop.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;do second_loop= first_location +1 to dim(array_name);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Apr 2019 17:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551814#M153363</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-17T17:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551822#M153367</link>
      <description>How many diags are you looking at? You could use WHICHC/WHICHN to find the first index easily and then use that number as your loop counter as Tom suggests. &lt;BR /&gt;&lt;BR /&gt;Alternatively, doing this in a long format data set is very trivial with BY group processing.</description>
      <pubDate>Wed, 17 Apr 2019 18:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551822#M153367</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-17T18:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551823#M153368</link>
      <description>&lt;P&gt;Thanks Tom but I tried what you suggested and it didn't work.&amp;nbsp; Below is some test data and it doesn't work but you can see where I want to start where the first occurrence was found +1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Reeza, I'd like to see if there is a solution I can use with the data wide but certainly if I have to make it long then I will.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the below example, charts 111111, 33333, 55555, and 66666 all have two codes from the same range and is what I would want picked up in the criteria of crit1 gt 0 and crit2 gt 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test_grp;
input @1  chart $5.
	  @6  regn  $3.
	  @9  dcde1  $3. 
	  @12 dcde2  $3.
	  @15 dcde3  $3.
	  @18 dcde4  $3.	 
;
cards;
11111001Y60J90B55Y84
22222002J90B89C40A40
33333003Y60Y68B94J90
44444004C93C82J44Y60
55555005Y60Y89L98M42
66666006Y60Y54A42G90
77777007B92F04C44C83
run; 

data test;
set test_grp;

array dx(4) dcde1-dcde4;

crit1=0;
crit2=0;

do i = 1 to 4;
if "Y60" &amp;lt;= substr(dx[i],1,3) &amp;lt;= "Y84" then crit1=1;
if "Y60" &amp;lt;= substr(dx[i],1,3) &amp;lt;= "Y84" then dx1_occur=i;
end;

do j = (dx1_occur+1) to 4;
if "Y60" &amp;lt;= substr(dx[j],1,3) &amp;lt;= "Y84" then crit1=1;
end;


if crit1 gt 0 and crit2 gt 0 then output;

run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:08:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551823#M153368</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2019-04-17T18:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551825#M153369</link>
      <description>Noticed an error in the code for j do loop, should be crit2=1.  Note also that the code for the do loop starting point doesn't work, just leaving it to show what I want to be able to do.  Thanks.</description>
      <pubDate>Wed, 17 Apr 2019 18:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551825#M153369</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2019-04-17T18:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551830#M153370</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data test;
set test_grp;

array dx(4) dcde1-dcde4;

crit1=0;
crit2=0;

do i = 1 to 4 while(crit1=0);
if "Y60" &amp;lt;= substr(dx[i],1,3) &amp;lt;= "Y84" then crit1=1;
end;

do j = i to 4;
if "Y60" &amp;lt;= substr(dx[j],1,3) &amp;lt;= "Y84" then crit2=1;
end;


*if crit1 gt 0 and crit2 gt 0 then output;

run;&lt;/PRE&gt;
&lt;P&gt;I switched it to a WHILE loop, so you can use I directly in the next loop. It automatically increments by 1, so you don't need to do that step either. I commented out the last line to check results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551830#M153370</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-17T18:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551832#M153371</link>
      <description>&lt;P&gt;Given that you have explained a little more, here is a shorter version of what you could do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
set test_grp;

array dx(4) dcde1-dcde4;

crit1=0;
crit2=0;

do i = 1 to 4;
   if crit1=1 and "Y60" &amp;lt;=: dx[i] &amp;lt;=: "Y84" then crit2=1;
   if "Y60" &amp;lt;=: dx[i] &amp;lt;=: "Y84" then crit1=1;
end;

if crit1 gt 0 and crit2 gt 0 then output;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Notice that you don't need SUBSTR as long as you add the colon to the end of the comparison ... a significant time-saver.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm also trying to understand why you need two flags instead of one:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
set test_grp;

array dx(4) dcde1-dcde4;

crit=0;

do i = 1 to 4;
   if "Y60" &amp;lt;=: dx[i] &amp;lt;=: "Y84" then crit + 1;
end;

if crit gt 1 then output;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:23:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551832#M153371</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-04-17T18:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551834#M153373</link>
      <description>&lt;P&gt;One of the nice features of DO loops is you can combine iterative loops with WHILE or UNTIL condition testing.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  set test_grp;
  array dx dcde1-dcde4;
  crit1=0;
  crit2=0;
  dx1_occur=0;

  do i = 1 to dim(dx) until (crit1);
    crit1 = "Y60" &amp;lt;=: dx[i] &amp;lt;=: "Y84";
  end;
  if crit1 then dx1_occur=i;

  do i = (dx1_occur+1) to dim(dx) until (crit2);
    crit2 = "Y60" &amp;lt;=: dx[i] &amp;lt;=: "Y84";
  end;
  drop i;
  if crit1 and crit2 then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:23:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551834#M153373</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-17T18:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551835#M153374</link>
      <description>Just a quick FYI - character comparisons are tricky but I think it will work in this situation. It may not work for all though, so ensure that you do thorough testing with the character comparisons.</description>
      <pubDate>Wed, 17 Apr 2019 18:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551835#M153374</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-17T18:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551837#M153375</link>
      <description>&lt;P&gt;Thanks Reeza but that also picks up the cases that only have 1 of the codes in the range, not two codes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Astounding but crit1 isn't greater than zero unless I run the code to first find out that is the case i.e. nowhere else is crit1 mentioned to then be used in the do loop..or am I missing something?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shelley&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:25:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551837#M153375</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2019-04-17T18:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551839#M153376</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15342"&gt;@shellp55&lt;/a&gt;, only because I commented out the last criteria. Otherwise pretty sure it works. You only want record 1 and 3, correct?</description>
      <pubDate>Wed, 17 Apr 2019 18:26:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551839#M153376</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-17T18:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551842#M153377</link>
      <description>&lt;P&gt;Yes, you're missing the logic of the DO loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CRIT1 can get set within the loop, and CRIT2 only gets set after CRIT1 has already been set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give it a try.&amp;nbsp; And especially notice both possible programs.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551842#M153377</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-04-17T18:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551843#M153378</link>
      <description>&lt;P&gt;If you just want to find cases with 2 or more codes in the same group then keep count of how many you find.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  set test_grp;
  array dx dcde1-dcde4;
  found=0;
  do i = 1 to dim(dx) until (found&amp;gt;=2);
    found +  ("Y60" &amp;lt;=: dx[i] &amp;lt;=: "Y84");
  end;
  if found &amp;gt;= 2 then output;
  drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551843#M153378</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-17T18:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551844#M153379</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data test_grp;
input @1  chart $5.
	  @6  regn  $3.
	  @9  dcde1  $3. 
	  @12 dcde2  $3.
	  @15 dcde3  $3.
	  @18 dcde4  $3.	 
;
cards;
11111001Y60J90B55Y84
22222002J90B89C40A40
33333003Y60Y68B94J90
44444004C93C82J44Y60
55555005Y60Y89L98M42
66666006Y60Y54A42G90
77777007B92F04C44C83
run; 
data test1;
set test_grp;

array dx(4) dcde1-dcde4;

crit1=0;
crit2=0;

do i = 1 to 4;
if "Y60" &amp;lt;= substr(dx[i],1,3) &amp;lt;= "Y84" then crit1=1;
if "Y60" &amp;lt;= substr(dx[i],1,3) &amp;lt;= "Y84" then do;
dx1_occur=i;
leave;
end;
end;
if dx1_occur&amp;gt;. then  do j = (dx1_occur+1) to 4;
if "Y60" &amp;lt;= substr(dx[j],1,3) &amp;lt;= "Y84" then crit2=1;
end;
if crit1 and crit2 then output;
run;
proc print noobs;run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.TEST1" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l header" scope="col"&gt;chart&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;regn&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;dcde1&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;dcde2&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;dcde3&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;dcde4&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;crit1&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;crit2&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;i&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;dx1_occur&lt;/TH&gt;
&lt;TH class="r header" scope="col"&gt;j&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;11111&lt;/TD&gt;
&lt;TD class="l data"&gt;001&lt;/TD&gt;
&lt;TD class="l data"&gt;Y60&lt;/TD&gt;
&lt;TD class="l data"&gt;J90&lt;/TD&gt;
&lt;TD class="l data"&gt;B55&lt;/TD&gt;
&lt;TD class="l data"&gt;Y84&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;33333&lt;/TD&gt;
&lt;TD class="l data"&gt;003&lt;/TD&gt;
&lt;TD class="l data"&gt;Y60&lt;/TD&gt;
&lt;TD class="l data"&gt;Y68&lt;/TD&gt;
&lt;TD class="l data"&gt;B94&lt;/TD&gt;
&lt;TD class="l data"&gt;J90&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551844#M153379</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-04-17T18:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551847#M153380</link>
      <description>&lt;P&gt;This works Tom, thanks so much!&amp;nbsp; I firstly indicated that charts 55555 and 66666 should also be flagged but I noticed when they didn't show up with your code it is because two of the codes are out of range within those charts so we are good.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again to everyone who offered assistance, greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551847#M153380</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2019-04-17T18:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Control Starting Point of Do Loop Based on Results of Other Field?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551852#M153382</link>
      <description>&lt;P&gt;Wow, so many people answering on this site, thanks very much Novinosrin!!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 18:35:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Control-Starting-Point-of-Do-Loop-Based-on-Results-of/m-p/551852#M153382</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2019-04-17T18:35:39Z</dc:date>
    </item>
  </channel>
</rss>

