<?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 How to make vlabel return missing value when label is null in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-vlabel-return-missing-value-when-label-is-null/m-p/971186#M377281</link>
    <description>&lt;P&gt;According to &lt;A href="https://go.documentation.sas.com/doc/en/vdmmlcdc/8.1/lefunctionsref/n0yyb3bsubs6lcn1mi8rlxmh47om.htm" target="_self"&gt;SAS Help Center&lt;/A&gt;, vlabel function&amp;nbsp;&lt;SPAN&gt;returns the label that is associated with that variable name, or the variable name if no label exists.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to make&amp;nbsp;vlabel return missing value when&amp;nbsp;&lt;SPAN&gt;no label exists&lt;/SPAN&gt;?&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jul 2025 03:38:39 GMT</pubDate>
    <dc:creator>whymath</dc:creator>
    <dc:date>2025-07-21T03:38:39Z</dc:date>
    <item>
      <title>How to make vlabel return missing value when label is null</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-vlabel-return-missing-value-when-label-is-null/m-p/971186#M377281</link>
      <description>&lt;P&gt;According to &lt;A href="https://go.documentation.sas.com/doc/en/vdmmlcdc/8.1/lefunctionsref/n0yyb3bsubs6lcn1mi8rlxmh47om.htm" target="_self"&gt;SAS Help Center&lt;/A&gt;, vlabel function&amp;nbsp;&lt;SPAN&gt;returns the label that is associated with that variable name, or the variable name if no label exists.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to make&amp;nbsp;vlabel return missing value when&amp;nbsp;&lt;SPAN&gt;no label exists&lt;/SPAN&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 03:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-vlabel-return-missing-value-when-label-is-null/m-p/971186#M377281</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2025-07-21T03:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to make vlabel return missing value when label is null</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-vlabel-return-missing-value-when-label-is-null/m-p/971187#M377282</link>
      <description>&lt;P&gt;Parse the result and if the same as the variable then set to missing would be the only approach I am aware of.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when you have a label like "Name" for a variable with the name of 'Name' you are going to cause problems.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get a missing value for the label by examining sashelp.vcolumn, or dictionary.columns or an output data set created with Proc Contents. If a label is not assigned the Label variable would be missing in the resulting data set.&lt;/P&gt;
&lt;P&gt;Example looking at the SAS supplied data set SASHELP.CLASS that you should have installed:&lt;/P&gt;
&lt;PRE&gt;Proc contents data=sashelp.class out=work.classinfo;
run;&lt;/PRE&gt;
&lt;P&gt;Or&lt;/P&gt;
&lt;PRE&gt;data work.classinfo2;
   set sashelp.vcolumn (where=(libname='SASHELP' and memname='CLASS'));
run;&lt;/PRE&gt;
&lt;P&gt;Or&lt;/P&gt;
&lt;PRE&gt;proc sql;
   create table work.classinfo3 as
   select *
   from dictionary.columns
        where libname='SASHELP' and memname='CLASS'
   ;
quit;&lt;/PRE&gt;
&lt;P&gt;Note that the Proc Contents data set has a different structure and content than the the other two.&lt;/P&gt;
&lt;P&gt;If using the SASHELP.VCOLUMN or dictionary table the Libname&amp;nbsp; and Memname, library and data set names, must use upper case values from the source as that is how they are stored. The view holding, SASHELP.VCOLUMN holds information of every variable in every data set in your current session and if you don't provide the library and member name you will get a lot of unwanted stuff.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 04:11:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-vlabel-return-missing-value-when-label-is-null/m-p/971187#M377282</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2025-07-21T04:11:18Z</dc:date>
    </item>
  </channel>
</rss>

