<?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: creating variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591866#M169642</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input VAR $10.;
datalines;
alfred876  
nancy65    
abst656    
tre656cy   
1256nan    
;

data want;
    set have;
    var1=length(var);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 26 Sep 2019 14:21:27 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-09-26T14:21:27Z</dc:date>
    <item>
      <title>creating variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591864#M169641</link>
      <description>&lt;P&gt;data test;&lt;BR /&gt;infile datalines;&lt;BR /&gt;input var $;&lt;BR /&gt;datalines;&lt;BR /&gt;alfred876&lt;BR /&gt;nancy65&lt;BR /&gt;abst656&lt;BR /&gt;tre656cy&lt;BR /&gt;1256nan&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Hey all,&lt;BR /&gt;Here's one question ,&lt;BR /&gt;Consider above dataset TEST in that there is one variable VAR.&lt;BR /&gt;i want another variable consider VAR2 that contains the length of values of VAR.&lt;BR /&gt;example:&lt;BR /&gt;VAR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VAR1&lt;BR /&gt;alfred876&amp;nbsp; &amp;nbsp; 9&lt;BR /&gt;nancy65&amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;BR /&gt;abst656&amp;nbsp; &amp;nbsp; &amp;nbsp; 7&lt;BR /&gt;tre656cy&amp;nbsp; &amp;nbsp; &amp;nbsp;8&lt;BR /&gt;1256nan&amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Output dataset should be like above dataset in example.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 14:19:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591864#M169641</guid>
      <dc:creator>Soham0707</dc:creator>
      <dc:date>2019-09-26T14:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: creating variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591866#M169642</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input VAR $10.;
datalines;
alfred876  
nancy65    
abst656    
tre656cy   
1256nan    
;

data want;
    set have;
    var1=length(var);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Sep 2019 14:21:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591866#M169642</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-09-26T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: creating variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591867#M169643</link>
      <description>&lt;P&gt;Use the LENGTH function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Examples are here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0f6jve4kdxnh1n1m7c82fhosgih.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmmvacdc&amp;amp;cdcVersion=9.4&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=n0f6jve4kdxnh1n1m7c82fhosgih.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 14:21:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591867#M169643</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-09-26T14:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: creating variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591869#M169644</link>
      <description>Thank you so much draycut...</description>
      <pubDate>Thu, 26 Sep 2019 14:24:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591869#M169644</guid>
      <dc:creator>Soham0707</dc:creator>
      <dc:date>2019-09-26T14:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: creating variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591870#M169645</link>
      <description>Thanks a lot Paigemiller</description>
      <pubDate>Thu, 26 Sep 2019 14:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-variable/m-p/591870#M169645</guid>
      <dc:creator>Soham0707</dc:creator>
      <dc:date>2019-09-26T14:25:08Z</dc:date>
    </item>
  </channel>
</rss>

