<?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 The global option nolabel removes variable labels listed in dictionaries in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868477#M343083</link>
    <description>&lt;P&gt;The global option nolabel does not just remove the variable label in dictionaries but also the contents of the label variable (dictionary.columns/sashelp.vcolumn and proc contents).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a workaround to avoid this such as another global option I would not be aware of?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo;
   test=1;
   label test='test';
run;

options nolabel;

proc print data=sashelp.vcolumn;
    where upcase(libname)='WORK' and
          upcase(memname)='DEMO';
    var libname memname name label;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 06 Apr 2023 17:30:17 GMT</pubDate>
    <dc:creator>xxformat_com</dc:creator>
    <dc:date>2023-04-06T17:30:17Z</dc:date>
    <item>
      <title>The global option nolabel removes variable labels listed in dictionaries</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868477#M343083</link>
      <description>&lt;P&gt;The global option nolabel does not just remove the variable label in dictionaries but also the contents of the label variable (dictionary.columns/sashelp.vcolumn and proc contents).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a workaround to avoid this such as another global option I would not be aware of?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data demo;
   test=1;
   label test='test';
run;

options nolabel;

proc print data=sashelp.vcolumn;
    where upcase(libname)='WORK' and
          upcase(memname)='DEMO';
    var libname memname name label;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Apr 2023 17:30:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868477#M343083</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2023-04-06T17:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: The global option nolabel removes variable labels listed in dictionaries</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868488#M343087</link>
      <description>&lt;P&gt;If you only want the label for the duration of one proc then turn the option back on:&lt;/P&gt;
&lt;PRE&gt;options label;
proc print data=sashelp.vcolumn;
    where upcase(libname)='WORK' and
          upcase(memname)='DEMO';
    var libname memname name label;
run;&lt;/PRE&gt;
&lt;P&gt;You will see that that the label is in the dictionary table.&lt;/P&gt;
&lt;P&gt;Note that both the dictionary table reference and the sashelp.vcolumn and other information tables are VIEWS. Which means that they are populated when used. If you have the NOLABEL in effect then the dictionary view is honoring the setting when used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Personally in 30+ years using SAS I have never had a need to set the NOLABEL option though had some source code provided that had unexpected results because the option was buried in the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 22:14:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868488#M343087</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-06T22:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: The global option nolabel removes variable labels listed in dictionaries</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868514#M343098</link>
      <description>&lt;P&gt;NOLABEL does not&amp;nbsp;&lt;EM&gt;remove&lt;/EM&gt; labels, it only tells all SAS procedures to&amp;nbsp;&lt;EM&gt;ignore&lt;/EM&gt; them. Since the DICTIONARY tables are created dynamically whenever used, they also honor the setting of the option.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 20:26:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868514#M343098</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-06T20:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: The global option nolabel removes variable labels listed in dictionaries</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868524#M343104</link>
      <description>&lt;P&gt;Depending on the use-case, perhaps you could create a view of the dataset with the labels removed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
   test=1;
   label test='label for test';
run;

options nolabel;

data want_nolabel / view=want_nolabel ;
  set have ;
run ;

options label;

proc print data=sashelp.vcolumn;
    where upcase(libname)='WORK' and
          upcase(memname) IN ("HAVE" "WANT_NOLABEL");
    var libname memname name label;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Apr 2023 21:03:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868524#M343104</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-04-06T21:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: The global option nolabel removes variable labels listed in dictionaries</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868535#M343109</link>
      <description>&lt;P&gt;As I don't usually create my own views, I never realized that the global option nolabel also affects the variable labels in the view. Good to know. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 22:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868535#M343109</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2023-04-06T22:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: The global option nolabel removes variable labels listed in dictionaries</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868536#M343110</link>
      <description>&lt;P&gt;I understand why it happens. The thing is that the user will only search for an explanation when he notices the absence of the variable labels and it can take years sometime to notice it. A logical explanation is not sufficient to avoid daily pitfalls.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 22:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868536#M343110</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2023-04-06T22:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: The global option nolabel removes variable labels listed in dictionaries</title>
      <link>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868554#M343120</link>
      <description>&lt;P&gt;That's why the default setting of the option is LABEL. If someone changes that (and does not sufficiently&amp;nbsp;&lt;U&gt;document&lt;/U&gt; it), it's not the fault of the SAS system.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 05:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/The-global-option-nolabel-removes-variable-labels-listed-in/m-p/868554#M343120</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-04-07T05:49:41Z</dc:date>
    </item>
  </channel>
</rss>

