<?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: Variables listing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238339#M308736</link>
    <description>Unfortunately not &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;You could create a macro to create the names, but if you only have 3 it's not useful.  &lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;length var $1000.;&lt;BR /&gt;&lt;BR /&gt;do i=1 to 10;&lt;BR /&gt;&lt;BR /&gt;var=catt(var, " Total"||put(i, 2. -l), " Male"||put(i, 2. -l), " Female"||put(i, 2. -l));&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;call symputx('input_list', var);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%put &amp;amp;input_list;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 08 Dec 2015 16:57:49 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-12-08T16:57:49Z</dc:date>
    <item>
      <title>Variables listing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238334#M308734</link>
      <description>&lt;P&gt;I have variables name like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Total1, Male 2 Female1,Total2, Male&amp;nbsp;2 Female2, Total3, Male&amp;nbsp;3 Female3, Total4, Male&amp;nbsp;4 Female4..... Total n, Male n, Female n.&lt;/P&gt;&lt;P&gt;Is there any shortcuts to such variable names to list for input statement?&amp;nbsp; Like X1 X2 X3 --&amp;gt;&amp;nbsp;&amp;nbsp; X1- X3&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 16:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238334#M308734</guid>
      <dc:creator>Chieko</dc:creator>
      <dc:date>2015-12-08T16:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Variables listing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238338#M308735</link>
      <description>&lt;P&gt;You just did that! Have you tried?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data test;
input x1-x3;
cards;
 1 2 3
 ;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Edit: After viewing &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza﻿&lt;/a&gt;, I realize that I misread your question.&amp;nbsp;Please ignore my response. I didn't delete it just for the sake of record.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 17:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238338#M308735</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-12-08T17:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Variables listing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238339#M308736</link>
      <description>Unfortunately not &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;You could create a macro to create the names, but if you only have 3 it's not useful.  &lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;length var $1000.;&lt;BR /&gt;&lt;BR /&gt;do i=1 to 10;&lt;BR /&gt;&lt;BR /&gt;var=catt(var, " Total"||put(i, 2. -l), " Male"||put(i, 2. -l), " Female"||put(i, 2. -l));&lt;BR /&gt;end;&lt;BR /&gt;&lt;BR /&gt;call symputx('input_list', var);&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%put &amp;amp;input_list;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Dec 2015 16:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238339#M308736</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-08T16:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Variables listing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238347#M308737</link>
      <description>&lt;P&gt;You will need to know how many sets appear on a line.&amp;nbsp; And even then the programming is somewhat sophisticated:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;infile rawdata dlm=',';&lt;/P&gt;
&lt;P&gt;array total {5};&lt;/P&gt;
&lt;P&gt;array male {5};&lt;/P&gt;
&lt;P&gt;array female {5};&lt;/P&gt;
&lt;P&gt;do J=1 to 5;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; input total{J} male{J} female{J} @&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The variables won't be stored in the same order internally, but you can certainly shorten the program.&amp;nbsp; Good luck.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 17:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238347#M308737</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-12-08T17:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Variables listing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238348#M308738</link>
      <description>&lt;P&gt;Thank you for your quick resposne to my question. I have more than 100 sets it&amp;nbsp;would be useful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 19:57:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238348#M308738</guid>
      <dc:creator>Chieko</dc:creator>
      <dc:date>2015-12-08T19:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: Variables listing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238350#M308739</link>
      <description>&lt;P&gt;Thank you anyway&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 17:48:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variables-listing/m-p/238350#M308739</guid>
      <dc:creator>Chieko</dc:creator>
      <dc:date>2015-12-08T17:48:07Z</dc:date>
    </item>
  </channel>
</rss>

