<?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 use array or macro to rewrite the code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287470#M59156</link>
    <description>&lt;P&gt;It really helps if you explain what the code is trying to do.&lt;/P&gt;
&lt;P&gt;I notice that the two blocks of code are doing different things. &amp;nbsp;Is that on purpose?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your first example outputs one copy of the record to either of two datasets.&lt;/P&gt;
&lt;P&gt;Your second would (if it ran) output multiple copies of the record when there are multiple variables that match the condition.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2016 13:28:14 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2016-07-27T13:28:14Z</dc:date>
    <item>
      <title>how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287358#M59107</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;current working code:

data m2 m3;
set m1;
if substr(d_c_p1,1,3) = 'o9' or substr(d_c_p2,1,3) = 'o9' or substr(d_c_p3,1,3) = 'o9' 
or substr(d_c1,1,3) = 'E8' or substr(d_c2,1,3) = 'E8'
or substr(d_c3,1,3) = 'E8' or substr(d_c4,1,3) = 'E8' or substr(d_c4,1,3) = 'E8' or substr(d_c5,1,3) = 'E8' or substr(d_c6,1,3) = 'E8'or substr(d_c7,1,3) = 'E8'  then output m3;
else output m2;
run;

The one I modify but does not work so far.
array d_c_p{3}d_c_p1-d_c_p3;
do i=1 to 3;
if substr(d_c_p{i},1,3) = 'o9' then do output=m3; end;

array dx_code{7}d_c1-d_c7;
	do j=1 to 7;
		if substr(d_c{j}, 1,3)='E8' then do output=m3; end;
	end;end;
else output m2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the error message is:&lt;/P&gt;
&lt;P&gt;: No matching IF-THEN clause&lt;/P&gt;
&lt;P&gt;for the else output m2&lt;/P&gt;
&lt;P&gt;please give advice how to correct thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 22:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287358#M59107</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-26T22:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287362#M59111</link>
      <description>&lt;P&gt;1. Missing a semi colon after DO.&lt;/P&gt;
&lt;P&gt;2. Not an error but it's easier if you declare all arrays at top of code&lt;/P&gt;
&lt;P&gt;3. Reference for second array should be dx_code not d_c(j)&lt;/P&gt;
&lt;P&gt;4. When trying to output it's OUTPUT &amp;lt;dataset names(s)&amp;gt;, no equal sign&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ways to avoid these errors:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Program one piece at a time&lt;/LI&gt;
&lt;LI&gt;Read your log&lt;/LI&gt;
&lt;LI&gt;Format code with indends to see logic more clearly&lt;/LI&gt;
&lt;LI&gt;If you have only one action after an IF condition you don't need an DO/END. (if &amp;lt;condition met&amp;gt; then output &amp;lt;dataset name(s)&amp;gt;)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't actually check if you have the correct do/end amounts or if the code makes sense, just the few things that a quick scan found. You may still have other errors, but you're on the correct path.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array d_c_p{3}d_c_p1-d_c_p3;
array dx_code{7}d_c1-d_c7;

	do i=1 to 3;

		if substr(d_c_p{i}, 1, 3)='o9' then
			do;
				output m3;
			end;
		

		do j=1 to 7;

			if substr(dx_code(j), 1, 3)='E8' then
				do;
					output m3;
				end;
		end;
	end;
	else
		output m2;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jul 2016 22:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287362#M59111</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-26T22:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287369#M59116</link>
      <description>&lt;P&gt;Thanks. I use your code&lt;/P&gt;
&lt;P&gt;still the error message showed&lt;/P&gt;
&lt;P&gt;else marked as red&lt;/P&gt;
&lt;P&gt;no matching if-then clause&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 22:58:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287369#M59116</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-26T22:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287370#M59117</link>
      <description>&lt;P&gt;Count your do/end and make sure they match up.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: Show your log and trace your logic from that statement. Find the matching If for your last else condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;PS It doesn't exist.&lt;/LI-SPOILER&gt;</description>
      <pubDate>Tue, 26 Jul 2016 23:03:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287370#M59117</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-26T23:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287372#M59119</link>
      <description>&lt;P&gt;I have four do and four end&lt;/P&gt;
&lt;P&gt;the error marked :else as saying no matching if-then clause&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;        output m3;
1330                  end;
1331          end;
1332  END;
1333      else
          ----
          160
ERROR 160-185: No matching IF-THEN clause.

1334          output M2;
1335
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jul 2016 23:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287372#M59119</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-26T23:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287373#M59120</link>
      <description>&lt;P&gt;Your first data step will output one record into M3 if any of the values match.&lt;/P&gt;
&lt;P&gt;Your array approach is going to output the record each time one of the values matches, is that what you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reformatting the code with the error to show the relationship between your do loops:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data m2 m3;
   set m1;
   array d_c_p{3}d_c_p1-d_c_p3;
   array dx_code{7}d_c1-d_c7;

   do i=1 to 3;
      if substr(d_c_p{i},1,3) = 'o9' then do output=m3; end;

   	do j=1 to 7;
   		if substr(d_c{j}, 1,3)='E8' then do output=m3; end;
   	end;
   end; /* would end the i loop*/
   else output m2; /* this else is not associated with any IF.*/
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Provide an example of the input data, in the form of a data step. This links to instruction on a way to create a datastep from your M1 set: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The provide the desired result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might be looking for something similar to this, untested&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data m2 m3;
   set m1;
   array var {10} d_c_p1-d_c_p3 d_c1-d_c7;
   array val {10} $ 2 _temporary_ ('o9','o9','o9','E8','E8','E8','E8','E8','E8','E8') ;

   do i=1 to dim(var);
      if substr(var{i},1,3) = val{i} then do;
         output=m3; 
         Found=1;
         leave ;
      end;
   end;

   if missing(found) then output m2; 
   drop found;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jul 2016 17:29:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287373#M59120</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-28T17:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287462#M59153</link>
      <description>&lt;P&gt;in reality, , J=30 ( I need to repeat 30 times), i=3, so to use your code, seems to be a little bit time consuming&lt;/P&gt;
&lt;P&gt;any other advice?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 13:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287462#M59153</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-27T13:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287468#M59155</link>
      <description>&lt;P&gt;Why does it matter how many times it occurs?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 13:22:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287468#M59155</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-27T13:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287470#M59156</link>
      <description>&lt;P&gt;It really helps if you explain what the code is trying to do.&lt;/P&gt;
&lt;P&gt;I notice that the two blocks of code are doing different things. &amp;nbsp;Is that on purpose?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your first example outputs one copy of the record to either of two datasets.&lt;/P&gt;
&lt;P&gt;Your second would (if it ran) output multiple copies of the record when there are multiple variables that match the condition.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 13:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287470#M59156</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2016-07-27T13:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287524#M59178</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;in reality, , J=30 ( I need to repeat 30 times), i=3, so to use your code, seems to be a little bit time consuming&lt;/P&gt;
&lt;P&gt;any other advice?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you are referring to my code with the temporary array being "time consuming" I think you have another issue. Adding another 20 variables and 20 values to the temporary array (in the correct order) &lt;STRONG&gt;as long as you are looking at the first 3 characters of each variable&lt;/STRONG&gt; is a trivial amount of time compared to writing 30 if then else type statements and relatively easy to maintain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 16:42:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287524#M59178</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-27T16:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287572#M59192</link>
      <description>&lt;P&gt;EDIT:&lt;/P&gt;&lt;P&gt;To show an improved version of the earlier program. Here, after taking the 2-byte portions, put all together into a STRING- just taking not more than 50 bytes, using INDEX function we can search for the presence of '09' OR 'E8'. No need for 2 do-loops.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data m2 m3;
   set m1;
   length dcp1 dcp2 dcp3 dc1 dc2 dc3 dc4 dc5 dc6 dc7 $2;
   length STR $50;
   dcp1 = d_c_p1;
   dcp2 = d_c_p2;
   dcp3 = d_c_p3;
   
   dc1 = d_c1;
   dc2 = d_c2;
   dc3 = d_c3;
   dc4 = d_c4;
   dc5 = d_c5;
   dc6 = d_c6;
   dc7 = d_c7;

   call catx(' ',STR, dcp1,dcp2,dcp3,dc1,dc2,dc3,dc4,dc5,dc6,dc7);

   match = (index(STR, '09') | index(STR, 'E8'));
 
   if match then output m3;
   else output m2;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. You are taking 3 characters and comparing with 2 characters. I presume that you want 2 characters.&lt;BR /&gt;2. Assigning to a character variable of length 2 with your string will be faster than the use of SUBSTR() function.&lt;BR /&gt;&lt;BR /&gt;With these changes I placing the program below. This is not tested as your data set M1 is not known. Please test it and let the Community know about it.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data m2 m3;
set m1;
length dcp1 dcp2 dcp3 dc1 dc2 dc3 dc4 dc5 dc6 dc7 $3;
dcp1 = d_c_p1;
dcp2 = d_c_p2;
dcp3 = d_c_p3;

dc1 = d_c1;
dc2 = d_c2;
dc3 = d_c3;
dc4 = d_c4;
dc5 = d_c5;
dc6 = d_c6;
dc7 = d_c7;
do i = dcp1, dcp2, dcp3;
if i = '09' then do;
Match1 = 1;
leave; * Early match ;
end;
end;
do i = dc1, dc2, dc3, dc4, dc5, dc6, dc7;
if i = 'E8' then do;
Match2 = 1;
leave; *Early Match;
end;
end;
if Match1 or Match2 then output m3;
else output m2;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 00:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/287572#M59192</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2016-07-28T00:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288150#M59366</link>
      <description>&lt;P&gt;Thanks for the effort. In fact, j=30, i=3, as I mentioned abover, so with your code, it generates a lot more variables, which take much time for later analysis. Any other tips.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 15:08:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288150#M59366</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-29T15:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288161#M59368</link>
      <description>Only i is used in the program and j is not.&lt;BR /&gt;Where do you want j = 30? Place your code and the LOG message for helping you further.</description>
      <pubDate>Fri, 29 Jul 2016 15:33:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288161#M59368</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2016-07-29T15:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288165#M59369</link>
      <description>&lt;P&gt;I found i and j are used by ballardw.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comparing a substring of 3-characters with 2-character value('09', 'E8') will give wrong results. Did you check this?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 15:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288165#M59369</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2016-07-29T15:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288177#M59374</link>
      <description>&lt;P&gt;Thanks. You are right. The value should be three but I typed wrong. I have used your code which works.&lt;/P&gt;
&lt;P&gt;The fact is i have dcp1 to 3, and dc 1-30 instead of 7 that I previously posted. &amp;nbsp;when i use you code, I have to type many times, adding more variables&lt;/P&gt;
&lt;P&gt;that is why I am asking whether you have a better suggestion on this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 17:04:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288177#M59374</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-29T17:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288179#M59375</link>
      <description>&lt;P&gt;&amp;lt;broken record&amp;gt; Change your data to a long format rather than a wide format &amp;lt;/broken record&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 17:08:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288179#M59375</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-29T17:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288182#M59377</link>
      <description>&lt;P&gt;I do not understand. Can you provide an example with sas code? Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 17:12:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288182#M59377</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-29T17:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288184#M59379</link>
      <description>&lt;P&gt;Post sample data as a data step so I don't have to make it up.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 17:13:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288184#M59379</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-07-29T17:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to use array or macro to rewrite the code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288214#M59383</link>
      <description>&lt;P&gt;I am datasp.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whom do you ask this question? Before asking question, write the name of person who replied.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I pointed out much earlier in my post that you are comparing a substring of 3 characters with the value of either '09' or 'E8'. This comparison is wrong. Again I asked you not to use SUBSTR() function and showed it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What you mean by "The value should be three but I typed wrong"?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Are you prepared to list your input variables once?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 18:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-array-or-macro-to-rewrite-the-code/m-p/288214#M59383</guid>
      <dc:creator>KachiM</dc:creator>
      <dc:date>2016-07-29T18:26:22Z</dc:date>
    </item>
  </channel>
</rss>

