<?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: array: Way of get variables in array taken together (not one by one) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/array-Way-of-get-variables-in-array-taken-together-not-one-by/m-p/306611#M65591</link>
    <description>&lt;P&gt;You can build the list this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.chars;
 char1 = "aa";
 char2 = "bb";
 output;
run;

data work.test2;
if 0 then set work.chars;
array ch _CHARACTER_; /* Declared before creating variable _GETNAMES */
length _GETNAMES $40 ;
do i = 1 to dim(ch);
   _GETNAMES = catx(", ", _GETNAMES, vname(ch{i}));
    end;
put _GETNAMES;
output;
stop;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 23 Oct 2016 03:30:15 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-10-23T03:30:15Z</dc:date>
    <item>
      <title>array: Way of get variables in array taken together (not one by one)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/array-Way-of-get-variables-in-array-taken-together-not-one-by/m-p/306564#M65558</link>
      <description>&lt;P&gt;I'm looking for a way to get the contents/variables of array.&lt;BR /&gt;For example&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.chars;
 char1 = "aa";
 char2 = "bb";
 output;
run;

data work.test2;
 length _GETNAMES $40. ;
 set work.chars;
 array ch _CHARACTER_;
 do over ch;
       _GETNAMES = vname(ch);
         if _GETNAMES ^= "_GETNAMES" then put _GETNAMES;
 end;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5438iD72F6554AD367362/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="array.JPG" title="array.JPG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We&amp;nbsp;know&amp;nbsp;that&amp;nbsp;array&amp;nbsp;"ch"&amp;nbsp;has&amp;nbsp;variable&amp;nbsp;cha1&amp;nbsp;char2&amp;nbsp;inside,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is&amp;nbsp;there&amp;nbsp;a&amp;nbsp;way&amp;nbsp;to&amp;nbsp;get&amp;nbsp;it&amp;nbsp;with&amp;nbsp;1&amp;nbsp;time?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;result&amp;nbsp;is&amp;nbsp;"cha1&amp;nbsp;char2"&amp;nbsp;or&amp;nbsp;"cha1,char2".&lt;/P&gt;&lt;P&gt;So&amp;nbsp;as&amp;nbsp;to&amp;nbsp;allow&amp;nbsp;“vlabel”&amp;nbsp;function&amp;nbsp;to&amp;nbsp;get&amp;nbsp;the content of label &amp;nbsp;in the&amp;nbsp;variable.&lt;/P&gt;&lt;P&gt;I'm&amp;nbsp;searching&amp;nbsp;a&amp;nbsp;function&amp;nbsp;or&amp;nbsp;way&amp;nbsp;to&amp;nbsp;catch&amp;nbsp;contents&amp;nbsp;of&amp;nbsp;array.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sincerely.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 15:01:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/array-Way-of-get-variables-in-array-taken-together-not-one-by/m-p/306564#M65558</guid>
      <dc:creator>t_ar_taat</dc:creator>
      <dc:date>2016-10-22T15:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: array: Way of get variables in array taken together (not one by one)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/array-Way-of-get-variables-in-array-taken-together-not-one-by/m-p/306611#M65591</link>
      <description>&lt;P&gt;You can build the list this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.chars;
 char1 = "aa";
 char2 = "bb";
 output;
run;

data work.test2;
if 0 then set work.chars;
array ch _CHARACTER_; /* Declared before creating variable _GETNAMES */
length _GETNAMES $40 ;
do i = 1 to dim(ch);
   _GETNAMES = catx(", ", _GETNAMES, vname(ch{i}));
    end;
put _GETNAMES;
output;
stop;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Oct 2016 03:30:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/array-Way-of-get-variables-in-array-taken-together-not-one-by/m-p/306611#M65591</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-10-23T03:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: array: Way of get variables in array taken together (not one by one)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/array-Way-of-get-variables-in-array-taken-together-not-one-by/m-p/306615#M65592</link>
      <description>&lt;P&gt;Hi,PGStats&lt;/P&gt;&lt;P&gt;It works well.&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5440i3C9AAAA61A497F04/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="array_ans.JPG" title="array_ans.JPG" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2016 04:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/array-Way-of-get-variables-in-array-taken-together-not-one-by/m-p/306615#M65592</guid>
      <dc:creator>t_ar_taat</dc:creator>
      <dc:date>2016-10-23T04:03:28Z</dc:date>
    </item>
  </channel>
</rss>

