<?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: when SAS output a value from the array, how can i ask SAS to tell you which array it com in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Arrays-when-SAS-output-a-value-from-the-array-how-can-i-ask-SAS/m-p/559319#M10274</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if input(scan(col{i}, 1, 'T'), yymmdd10.) &amp;lt;= input(aestdtc, yymmdd10.) then do;
prior_date = col{i};
whichcolumn = i;
end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 16 May 2019 14:27:42 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-05-16T14:27:42Z</dc:date>
    <item>
      <title>Arrays: when SAS output a value from the array, how can i ask SAS to tell you which array it comes</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Arrays-when-SAS-output-a-value-from-the-array-how-can-i-ask-SAS/m-p/559317#M10273</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Using the SAS code below, I can ask SAS to output the correct value from the column COL{i} when it meets the condition i specified in my code. However, i'm wondering how can I also ask SAS to tell me which COL{i} the value is coming from.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order word, prior_date is getting the values from the COL{i} column, I want to find a way to ask SAS also tell me which column the COL{i} is. Do you know how I can do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ae_temp1;&lt;BR /&gt;set ae_temp1;&lt;BR /&gt;array col{*} col1 - col12;&lt;/P&gt;&lt;P&gt;do i = 1 to 11;&lt;BR /&gt;if length(aestdtc) = 10 then&lt;BR /&gt;do;&lt;BR /&gt;if col{i+1} ^= '' then&lt;BR /&gt;do;&lt;BR /&gt;if input(scan(col{i}, 1, 'T'), yymmdd10.) &amp;lt;= input(aestdtc, yymmdd10.) and input(scan(col{i+1}, 1, 'T'), yymmdd10.) &amp;gt; input(aestdtc, yymmdd10.) then&lt;BR /&gt;Prior_date = col{i};&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;if col{i}^= '' and col{i+1} = '' then&lt;BR /&gt;do;&lt;BR /&gt;if input(scan(col{i}, 1, 'T'), yymmdd10.) &amp;lt;= input(aestdtc, yymmdd10.) then&lt;BR /&gt;prior_date = col{i};&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 14:06:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Arrays-when-SAS-output-a-value-from-the-array-how-can-i-ask-SAS/m-p/559317#M10273</guid>
      <dc:creator>yahoo0806</dc:creator>
      <dc:date>2019-05-16T14:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays: when SAS output a value from the array, how can i ask SAS to tell you which array it com</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Arrays-when-SAS-output-a-value-from-the-array-how-can-i-ask-SAS/m-p/559319#M10274</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if input(scan(col{i}, 1, 'T'), yymmdd10.) &amp;lt;= input(aestdtc, yymmdd10.) then do;
prior_date = col{i};
whichcolumn = i;
end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 May 2019 14:27:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Arrays-when-SAS-output-a-value-from-the-array-how-can-i-ask-SAS/m-p/559319#M10274</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-05-16T14:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays: when SAS output a value from the array, how can i ask SAS to tell you which array it com</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Arrays-when-SAS-output-a-value-from-the-array-how-can-i-ask-SAS/m-p/559327#M10276</link>
      <description>&lt;P&gt;thank you very much! that works!&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 14:35:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Arrays-when-SAS-output-a-value-from-the-array-how-can-i-ask-SAS/m-p/559327#M10276</guid>
      <dc:creator>yahoo0806</dc:creator>
      <dc:date>2019-05-16T14:35:57Z</dc:date>
    </item>
  </channel>
</rss>

