<?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: Is there any way to shorten the multiple arrays processing in a datastep? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-shorten-the-multiple-arrays-processing-in-a/m-p/733179#M228477</link>
    <description>&lt;P&gt;You don't need arrays at all.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;  length DELW $15;
  do DELW='PN', 'PNA', 'PNB', 'PNC', 'PND', 'PNE', 'PNF',' PNG' 'RCSA' 'RCTB' 'PNDEAD';
    if GEOGN ='BRAZIL' and findw(ENAME,DELW,'eit') then delete;
  end;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Apr 2021 02:18:29 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-04-13T02:18:29Z</dc:date>
    <item>
      <title>Is there any way to shorten the multiple arrays processing in a datastep?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-shorten-the-multiple-arrays-processing-in-a/m-p/733174#M228472</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I generate a code below with a couple of arrays, is there any way to shorten the code ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data filter_each_country;
	set concatenate_;

	array delwords1 {18} $ 15 _temporary_ ('PN' 'PNA' 'PNB' 'PNC' 'PND' 'PNE' 'PNF'
		'PNG' 'RCSA' 'RCTB' 'PNDEAD' 'PNADEAD' 'PNBDEAD' 'PNCDEAD' 'PNDDEAD' 'PNEDEAD' 'PNFDEAD' 'PNGDEAD');

	do i= 1 to dim(delwords1);
		if GEOGN ='BRAZIL' and findw(ENAME,delwords1[i],'','eir') &amp;gt;0 then
			delete;
	end;

	array delwords2 {3} $ 15 _temporary_ ('PFCL' 'PRIVILEGIADAS' 'PRVLG');

	do i= 1 to dim(delwords2);
		if GEOGN ='COLOMBIA' and findw(ENAME,delwords2[i],'','eir') &amp;gt;0 then
			delete;
	end;

	array delwords3 {2} $ 15 _temporary_ ('PR' 'PB');

	do i= 1 to dim(delwords3);
		if GEOGN ='GREECE' and findw(ENAME,delwords3[i],'','eir') &amp;gt;0 then
			delete;
	end;

	array delwords4 {4} $ 15 _temporary_ ('FB' 'FBDEAD' 'RTS' 'RIGHTS');

	do i= 1 to dim(delwords4);
		if GEOGN ='INDONESIA' and findw(ENAME,delwords4[i],'','eir') &amp;gt;0 then
			delete;
	end;
/*Around 20 arrays*/
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Warm regards and thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 02:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-shorten-the-multiple-arrays-processing-in-a/m-p/733174#M228472</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-04-13T02:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to shorten the multiple arrays processing in a datastep?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-shorten-the-multiple-arrays-processing-in-a/m-p/733179#M228477</link>
      <description>&lt;P&gt;You don't need arrays at all.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;  length DELW $15;
  do DELW='PN', 'PNA', 'PNB', 'PNC', 'PND', 'PNE', 'PNF',' PNG' 'RCSA' 'RCTB' 'PNDEAD';
    if GEOGN ='BRAZIL' and findw(ENAME,DELW,'eit') then delete;
  end;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 02:18:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-shorten-the-multiple-arrays-processing-in-a/m-p/733179#M228477</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-04-13T02:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to shorten the multiple arrays processing in a datastep?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-shorten-the-multiple-arrays-processing-in-a/m-p/733207#M228491</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;In this way, I can set up one length statement for the whole data step by using&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;length delwords1-delwords20 $15;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;rather than list out all the length of each array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm regards.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 05:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-shorten-the-multiple-arrays-processing-in-a/m-p/733207#M228491</guid>
      <dc:creator>Phil_NZ</dc:creator>
      <dc:date>2021-04-13T05:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to shorten the multiple arrays processing in a datastep?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-shorten-the-multiple-arrays-processing-in-a/m-p/733217#M228498</link>
      <description>&lt;P&gt;You only need one DELWORD.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 06:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-shorten-the-multiple-arrays-processing-in-a/m-p/733217#M228498</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-04-13T06:11:29Z</dc:date>
    </item>
  </channel>
</rss>

