<?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: Create new variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-new-variable/m-p/604197#M175139</link>
    <description>&lt;P&gt;just loop each record&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
do newvar=1 to 3;
 output;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 14 Nov 2019 17:23:42 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-11-14T17:23:42Z</dc:date>
    <item>
      <title>Create new variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-new-variable/m-p/604196#M175138</link>
      <description>&lt;P&gt;Hi, I need to create a new variable consisting of three values 1, 2 and 3 and apply to all values to an already existing variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have:&lt;/P&gt;&lt;P&gt;A&lt;/P&gt;&lt;P&gt;B&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I need:&lt;/P&gt;&lt;P&gt;A 1&lt;/P&gt;&lt;P&gt;A 2&lt;/P&gt;&lt;P&gt;A 3&lt;/P&gt;&lt;P&gt;B 1&lt;/P&gt;&lt;P&gt;B 2&lt;/P&gt;&lt;P&gt;B 3&lt;/P&gt;&lt;P&gt;C 1&lt;/P&gt;&lt;P&gt;C 2&lt;/P&gt;&lt;P&gt;C 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realize this is probably an easy fix, but I can't figure it out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 17:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-new-variable/m-p/604196#M175138</guid>
      <dc:creator>KatLinden</dc:creator>
      <dc:date>2019-11-14T17:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-new-variable/m-p/604197#M175139</link>
      <description>&lt;P&gt;just loop each record&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
do newvar=1 to 3;
 output;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Nov 2019 17:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-new-variable/m-p/604197#M175139</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-11-14T17:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-new-variable/m-p/604198#M175140</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input var1 $;
datalines;
A
B
C
;

data want;
   set have;
   do var2=1 to 3;
      output;
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Nov 2019 17:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-new-variable/m-p/604198#M175140</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-11-14T17:25:00Z</dc:date>
    </item>
  </channel>
</rss>

