<?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: Illegal reference to the array? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677621#M204419</link>
    <description>&lt;P&gt;You miss the index to array member.&lt;/P&gt;
&lt;P&gt;May be next code will work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set have ;	
	array string_{*} String1 - String6;
	  do i = 1 to 6;
	if prxmatch('/ECZEMA/i',string_(i)) then allergy=1;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 18 Aug 2020 19:52:37 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2020-08-18T19:52:37Z</dc:date>
    <item>
      <title>Illegal reference to the array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677613#M204416</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to search 'ECZEMA' in&amp;nbsp;the six&amp;nbsp;columns from string1 to string6.&amp;nbsp; Then I tried to run a do loop command.&amp;nbsp; But an error message was shown in the log window.&amp;nbsp; Please help, thank you.&lt;/P&gt;
&lt;PRE&gt;data want;
	set have ;	
	array string_{*} String1 - String6;
	  do i = 1 to 6;
	if prxmatch('/ECZEMA/i',string_) then allergy=1;
	end;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error messages were list below, and also why in the 'Note'&amp;nbsp;statement, 'Numeric values have been converted to character values?'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Illegal reference to the array string_.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;NOTE: Numeric values have been converted to character values at the places given by:&lt;/P&gt;
&lt;P&gt;(Line):(Column).&lt;/P&gt;
&lt;P&gt;105:38 106:38 107:42 108:47 109:27 110:34 111:34 113:44&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;
&lt;P&gt;WARNING: The data set WORK.have may be incomplete. When this step was&lt;/P&gt;
&lt;P&gt;stopped there were 0 observations and 18 variables.&lt;/P&gt;
&lt;P&gt;WARNING: Data set WORK.have was not replaced because this step was&lt;/P&gt;
&lt;P&gt;stopped.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 19:44:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677613#M204416</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2020-08-18T19:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal reference to the array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677618#M204418</link>
      <description>&lt;P&gt;You can try next code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set have ;	
	array string_{*} String1 - String6;
	 do i = 1 to 6;
	    if upcase(string_(i)) = "ECZEMA" then allergy=1;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Aug 2020 19:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677618#M204418</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-08-18T19:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal reference to the array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677621#M204419</link>
      <description>&lt;P&gt;You miss the index to array member.&lt;/P&gt;
&lt;P&gt;May be next code will work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set have ;	
	array string_{*} String1 - String6;
	  do i = 1 to 6;
	if prxmatch('/ECZEMA/i',string_(i)) then allergy=1;
	end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Aug 2020 19:52:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677621#M204419</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-08-18T19:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal reference to the array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677623#M204420</link>
      <description>&lt;P&gt;You forgot the index in your array reference&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if prxmatch('/ECZEMA/i', string_{i}) then allergy = 1;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 19:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677623#M204420</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-08-18T19:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal reference to the array?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677625#M204421</link>
      <description>&lt;P&gt;I have multiple prematching texts, which are not just 'ECZEMA,'&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 20:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Illegal-reference-to-the-array/m-p/677625#M204421</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2020-08-18T20:04:16Z</dc:date>
    </item>
  </channel>
</rss>

