<?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: Changing some variables' names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Changing-some-variables-names/m-p/819429#M323451</link>
    <description>&lt;P&gt;Make the PUT conditional:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if i gt 6 then put _vname +(-1) '=V' i @;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 21 Jun 2022 18:47:25 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-06-21T18:47:25Z</dc:date>
    <item>
      <title>Changing some variables' names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-some-variables-names/m-p/819426#M323450</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I am using the below code to change variables' names. This code is changing all of the variables' names however i don't want to change first 6 variables' names. could you please give me an idea on how to modify it?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data tr2_rlb_mat_1;
set tr_rlb_mat_1;
filename tmp temp;
data _null_;
if 0 then set tr2_rlb_mat_1;
length _vname $60;
file tmp;
put 'rename ' @;
do i=1 by 1 until (upcase(_vname)='_VNAME');
call vnext(_vname);
if upcase(_vname)='_VNAME' then leave;
put _vname +(-1) '=V' i @;
end; 
put ';';
run;
proc datasets library=work nolist;
modify tr2_rlb_mat_1;
%include tmp / source2;
run;
quit;
ods select none;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Jun 2022 18:41:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-some-variables-names/m-p/819426#M323450</guid>
      <dc:creator>dustychair</dc:creator>
      <dc:date>2022-06-21T18:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Changing some variables' names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-some-variables-names/m-p/819429#M323451</link>
      <description>&lt;P&gt;Make the PUT conditional:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if i gt 6 then put _vname +(-1) '=V' i @;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Jun 2022 18:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-some-variables-names/m-p/819429#M323451</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-06-21T18:47:25Z</dc:date>
    </item>
  </channel>
</rss>

