<?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: Arrays in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762064#M241237</link>
    <description>&lt;P&gt;To recommend changes we would have to know what the input looks like and the desired output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arrays can have a lot of different variables as long as they are of the same type, numeric or character.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Aug 2021 14:03:56 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-08-17T14:03:56Z</dc:date>
    <item>
      <title>Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762055#M241231</link>
      <description>&lt;P&gt;Can I write two different variable names in the array as shown below if not how would i change the code below?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array diag{*} MAIN_PROBLEM OTHER_PROBLEM_:;
		do i = 1 to dim(diag);
		if diag{i} in ('L400' 'L401' 'L403' 'L409') then gpp = 1;
		if diag{i} in: ('O04' 'O07' 'P964') then TA = 1;
	end;

	/* exclude TA */
	array interv{*} MAIN_INTERVENTION OTHER_INTERVENTION_:
	   do j=1 to dim(interv);
	      if interv{j} in: ('5CA20' '5CA24' '5CA88' '5CA89' '5CA90') then TA = 1;
	end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;names in the array?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 13:41:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762055#M241231</guid>
      <dc:creator>Baba9</dc:creator>
      <dc:date>2021-08-17T13:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762058#M241233</link>
      <description>&lt;P&gt;Did you actually try running the code? What happened? If there is an error show us the ENTIRE log (that's 100% of the log, every single character, in the order it appears, do not chop out parts) for this DATA step.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 13:47:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762058#M241233</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-08-17T13:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762064#M241237</link>
      <description>&lt;P&gt;To recommend changes we would have to know what the input looks like and the desired output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Arrays can have a lot of different variables as long as they are of the same type, numeric or character.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 14:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762064#M241237</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-17T14:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762071#M241241</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/385462"&gt;@Baba9&lt;/a&gt;,&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/385462"&gt;@Baba9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Can I write two different variable names in the array as shown below ...&lt;/P&gt;
&lt;PRE&gt;...
	array interv{*} MAIN_INTERVENTION OTHER_INTERVENTION_:&lt;FONT size="5" color="#FF0000"&gt;;&lt;/FONT&gt;
...&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, your code is syntactically correct, except for the missing semicolon after the second ARRAY statement.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 14:21:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762071#M241241</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-08-17T14:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762072#M241242</link>
      <description>&lt;P&gt;What is the question exactly.&lt;/P&gt;
&lt;P&gt;Yes you can type as many variables names into an ARRAY statement as you want.&lt;/P&gt;
&lt;P&gt;If you use the : wildcard to specify the names by their prefix then the variables have a to already exist in the data step.&lt;/P&gt;
&lt;P&gt;But if you list them explicitly and those names do not already exist they will be created.&lt;/P&gt;
&lt;P&gt;So a statement like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array diag MAIN_PROBLEM OTHER_PROBLEM_:;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Will define the array DIAG with one or more variables, depending on how many existing variables have names that start with OTHER_PROBLEM_.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 14:21:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762072#M241242</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-08-17T14:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762142#M241263</link>
      <description>&lt;P&gt;Thankyou All&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 18:37:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Arrays/m-p/762142#M241263</guid>
      <dc:creator>Baba9</dc:creator>
      <dc:date>2021-08-17T18:37:10Z</dc:date>
    </item>
  </channel>
</rss>

