<?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 Prefix for array of variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Prefix-for-array-of-variables/m-p/486315#M126523</link>
    <description>&lt;P&gt;The below macro variable a will get a,b,c,d; may I know how to get a.a, a.b, a.c, a.d?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data test;&lt;BR /&gt;infile datalines dsd;&lt;BR /&gt;input a1 $ a2 $ a3 $ a4 $;&lt;BR /&gt;cards;&lt;BR /&gt;a,b,c,d&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data test;&lt;BR /&gt;set test;&lt;BR /&gt;call symputx("a",catx(",",of a: ));&lt;BR /&gt;run;&lt;BR /&gt;%put &amp;amp;a;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Aug 2018 10:46:49 GMT</pubDate>
    <dc:creator>scb</dc:creator>
    <dc:date>2018-08-13T10:46:49Z</dc:date>
    <item>
      <title>Prefix for array of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prefix-for-array-of-variables/m-p/486315#M126523</link>
      <description>&lt;P&gt;The below macro variable a will get a,b,c,d; may I know how to get a.a, a.b, a.c, a.d?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data test;&lt;BR /&gt;infile datalines dsd;&lt;BR /&gt;input a1 $ a2 $ a3 $ a4 $;&lt;BR /&gt;cards;&lt;BR /&gt;a,b,c,d&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data test;&lt;BR /&gt;set test;&lt;BR /&gt;call symputx("a",catx(",",of a: ));&lt;BR /&gt;run;&lt;BR /&gt;%put &amp;amp;a;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 10:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prefix-for-array-of-variables/m-p/486315#M126523</guid>
      <dc:creator>scb</dc:creator>
      <dc:date>2018-08-13T10:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Prefix for array of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prefix-for-array-of-variables/m-p/486317#M126525</link>
      <description>&lt;PRE&gt;data test;
  infile datalines dsd;
  input a1 $ a2 $ a3 $ a4 $;
  call symputx("a",cats("a.",catx(",a.",of a:)));  
cards;
a,b,c,d
;
run;
%put &amp;amp;a.;&lt;/PRE&gt;
&lt;P&gt;The question really is why you would be wanting to do that in the first place.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 10:49:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prefix-for-array-of-variables/m-p/486317#M126525</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-13T10:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Prefix for array of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Prefix-for-array-of-variables/m-p/486365#M126538</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/80526"&gt;@scb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The below macro variable a will get a,b,c,d; may I know how to get a.a, a.b, a.c, a.d?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data test;&lt;BR /&gt;infile datalines dsd;&lt;BR /&gt;input a1 $ a2 $ a3 $ a4 $;&lt;BR /&gt;cards;&lt;BR /&gt;a,b,c,d&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data test;&lt;BR /&gt;set test;&lt;BR /&gt;call symputx("a",catx(",",of a: ));&lt;BR /&gt;run;&lt;BR /&gt;%put &amp;amp;a;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You really do not want to do that as a.a is&amp;nbsp; not a valid SAS variable name in general and the . would have SAS report some sort of SCL error. You could make date name literals but you would have to reference the resulting variable as 'a.a'n every time you use it.&lt;/P&gt;
&lt;P&gt;So explain why you think you want a.a , a.b etc.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:46:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Prefix-for-array-of-variables/m-p/486365#M126538</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-13T14:46:55Z</dc:date>
    </item>
  </channel>
</rss>

