<?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: Variable labels in put statements in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Variable-labels-in-put-statements/m-p/390414#M11805</link>
    <description>&lt;P&gt;Try using the VLABEL function?&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;x=vlabel(varname);
if varname=. then put id= x="Missing value";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/85525"&gt;@RS93&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am creating a cleaning program for a dataset, and I would like to put the variable label instead of the variable name in my put statement without having to type each one individually. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I currently have is:&lt;/P&gt;
&lt;P&gt;if varname=. then put id= varname="Missing value";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want is:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;varname&lt;/SPAN&gt;&lt;SPAN&gt;=. then put&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;varlabel&lt;/SPAN&gt;&lt;SPAN&gt;="Missing value";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone please assist?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2017 20:21:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-08-23T20:21:39Z</dc:date>
    <item>
      <title>Variable labels in put statements</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Variable-labels-in-put-statements/m-p/390406#M11804</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a cleaning program for a dataset, and I would like to put the variable label instead of the variable name in my put statement without having to type each one individually. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I currently have is:&lt;/P&gt;&lt;P&gt;if varname=. then put id= varname="Missing value";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want is:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;varname&lt;/SPAN&gt;&lt;SPAN&gt;=. then put&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;varlabel&lt;/SPAN&gt;&lt;SPAN&gt;="Missing value";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone please assist?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 20:00:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Variable-labels-in-put-statements/m-p/390406#M11804</guid>
      <dc:creator>RS93</dc:creator>
      <dc:date>2017-08-23T20:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Variable labels in put statements</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Variable-labels-in-put-statements/m-p/390414#M11805</link>
      <description>&lt;P&gt;Try using the VLABEL function?&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;x=vlabel(varname);
if varname=. then put id= x="Missing value";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/85525"&gt;@RS93&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am creating a cleaning program for a dataset, and I would like to put the variable label instead of the variable name in my put statement without having to type each one individually. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I currently have is:&lt;/P&gt;
&lt;P&gt;if varname=. then put id= varname="Missing value";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want is:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;varname&lt;/SPAN&gt;&lt;SPAN&gt;=. then put&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;id&lt;/SPAN&gt;&lt;SPAN&gt;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;varlabel&lt;/SPAN&gt;&lt;SPAN&gt;="Missing value";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone please assist?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 20:21:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Variable-labels-in-put-statements/m-p/390414#M11805</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-08-23T20:21:39Z</dc:date>
    </item>
  </channel>
</rss>

