<?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: selecting Variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454841#M114982</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cc(keep=COL:);
set x;
a=cat(COL:); /*error */
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 Apr 2018 16:52:46 GMT</pubDate>
    <dc:creator>sathya66</dc:creator>
    <dc:date>2018-04-17T16:52:46Z</dc:date>
    <item>
      <title>selecting Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454833#M114975</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have columns 1-n&amp;nbsp;in have table &amp;nbsp;( like &lt;FONT face="Courier New" size="2"&gt;COL1 COL2 COL3 COL3 COL4 COL5 COL6&lt;/FONT&gt;).&amp;nbsp;I&amp;nbsp;want to write like this&amp;nbsp;(keep=COL(1-n). Instead of writing (&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;keep&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=COL1 COL2 COL3 COL3 COL4 COL5 COL6&lt;/FONT&gt;).&lt;/P&gt;&lt;P&gt;because I want to select 3 columns in 1 table and 10 columns in another table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;keep&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=COL1 COL2 COL3 COL3 COL4 COL5 COL6);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; have;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 16:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454833#M114975</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2018-04-17T16:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: selecting Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454834#M114976</link>
      <description>&lt;P&gt;Do you mean a shorter way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;test(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;keep&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=COL1-COL6);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;have;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 16:44:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454834#M114976</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-04-17T16:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: selecting Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454835#M114977</link>
      <description>&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;test(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;keep&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=COL:);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;have;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 16:45:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454835#M114977</guid>
      <dc:creator>rajeshalwayswel</dc:creator>
      <dc:date>2018-04-17T16:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: selecting Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454836#M114978</link>
      <description>&lt;P&gt;Variable Lists&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Test (keep = col1-col6);

data Test (keep = col:);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0wphcpsfgx6o7n1sjtqzizp1n39.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0wphcpsfgx6o7n1sjtqzizp1n39.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/93352"&gt;@sathya66&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I have columns 1-n&amp;nbsp;in have table &amp;nbsp;( like &lt;FONT face="Courier New" size="2"&gt;COL1 COL2 COL3 COL3 COL4 COL5 COL6&lt;/FONT&gt;).&amp;nbsp;I&amp;nbsp;want to write like this&amp;nbsp;(keep=COL(1-n). Instead of writing (&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;keep&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=COL1 COL2 COL3 COL3 COL4 COL5 COL6&lt;/FONT&gt;).&lt;/P&gt;
&lt;P&gt;because I want to select 3 columns in 1 table and 10 columns in another table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test(&lt;/FONT&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;keep&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=COL1 COL2 COL3 COL3 COL4 COL5 COL6);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; have;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 16:45:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454836#M114978</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-17T16:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: selecting Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454838#M114980</link>
      <description>Thanks,&lt;BR /&gt;data Test (keep = col:); this way&lt;BR /&gt;and also I want to concatenate the variables in a single variable .&lt;BR /&gt;&lt;BR /&gt;data cc(keep=COL:);&lt;BR /&gt;set x;&lt;BR /&gt;a=cat(COL:); /*error */&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 17 Apr 2018 16:51:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454838#M114980</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2018-04-17T16:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: selecting Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454841#M114982</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cc(keep=COL:);
set x;
a=cat(COL:); /*error */
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Apr 2018 16:52:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454841#M114982</guid>
      <dc:creator>sathya66</dc:creator>
      <dc:date>2018-04-17T16:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: selecting Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454842#M114983</link>
      <description>&lt;P&gt;Please paste your code into a code box, otherwise emojis invade.&lt;/P&gt;
&lt;P&gt;Check the link I included in my answer for examples to your new question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/93352"&gt;@sathya66&lt;/a&gt; wrote:&lt;BR /&gt;Thanks,&lt;BR /&gt;data Test (keep = col:); this way&lt;BR /&gt;and also I want to concatenate the variables in a single variable .&lt;BR /&gt;&lt;BR /&gt;data cc(keep=COL:);&lt;BR /&gt;set x;&lt;BR /&gt;a=cat(COL:); /*error */&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 16:53:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454842#M114983</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-17T16:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: selecting Variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454843#M114984</link>
      <description>&lt;P&gt;when using lists you need OF keyword to concat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;data cc(keep=COl: )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set x;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;a=cat(of col: )&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;ru&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 16:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/selecting-Variables/m-p/454843#M114984</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-04-17T16:53:29Z</dc:date>
    </item>
  </channel>
</rss>

