<?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: Value labels showing in output but not in actual .sas7bdat file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Value-labels-showing-in-output-but-not-in-actual-sas7bdat-file/m-p/668121#M200213</link>
    <description>&lt;P&gt;If you mean "value labels" in the SPSS sense, then you will be disappointed. SAS uses Formats, which are session based and the data set contains a reference to the default Format name. If the format is not available at the time you use the data set you may get an error (if option FMTERR is in effect) or the default format for the variable type will be used to create a display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the format the SAS session that opens the file will need to know where the format definition is.Which means that either the Proc Format code has to be submitted in that session or have the format in a permanent library and use system option FMTSEARCH to tell SAS to look in that library for format information in addition to the SAS system formats.&lt;/P&gt;
&lt;P&gt;And if you are using some other program to view the SAS data set I suspect you will be just plain out of luck.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jul 2020 17:47:36 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-07-09T17:47:36Z</dc:date>
    <item>
      <title>Value labels showing in output but not in actual .sas7bdat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-labels-showing-in-output-but-not-in-actual-sas7bdat-file/m-p/668083#M200185</link>
      <description>&lt;P&gt;I'm wondering why when I run the following program (I'm running EG, 7.1), the table that opens up in the Output Data tab in EG shows the value labels ("Under 18", "18-24", or "25 and over") in the 'Age Range'n column, but when I open y.sas7bdat from the location in which I saved it, the table that is displayed just shows the value codes instead ("a", "b", or "c") for this column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  VALUE  $agerangef 'a' = 'Under 18'
                    'b' = '18-24'
                    'c' = '25 and over';
run;

data lib.y;
	set x;
	length 'Age Range'n $ 11;
	if age&amp;lt;18 &amp;amp; age ~= . then 'Age Range'n = 'a';
		else if age &amp;gt;= 18 &amp;amp; age&amp;lt;=24 then 'Age Range'n = 'b';
		else if age &amp;gt;= 25 then 'Age Range'n = 'c'; 
	format 'Age Range'n $agerangef.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 21:52:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-labels-showing-in-output-but-not-in-actual-sas7bdat-file/m-p/668083#M200185</guid>
      <dc:creator>robeldritch</dc:creator>
      <dc:date>2020-07-09T21:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Value labels showing in output but not in actual .sas7bdat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-labels-showing-in-output-but-not-in-actual-sas7bdat-file/m-p/668088#M200186</link>
      <description>EG has the nofmterr option set to NO, so it won't generate an error. When you double click and load the file from explorer, you're not attaching it to the format file so it shows you the raw values. If the nofmterr option was set differently it would generate an error about unfound formats. &lt;BR /&gt;&lt;BR /&gt;When you open in within EG the formats are loaded and you'll see the formatted view. I wish there was a way to permanently attach formats to the data set &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 09 Jul 2020 16:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-labels-showing-in-output-but-not-in-actual-sas7bdat-file/m-p/668088#M200186</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-09T16:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Value labels showing in output but not in actual .sas7bdat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-labels-showing-in-output-but-not-in-actual-sas7bdat-file/m-p/668121#M200213</link>
      <description>&lt;P&gt;If you mean "value labels" in the SPSS sense, then you will be disappointed. SAS uses Formats, which are session based and the data set contains a reference to the default Format name. If the format is not available at the time you use the data set you may get an error (if option FMTERR is in effect) or the default format for the variable type will be used to create a display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use the format the SAS session that opens the file will need to know where the format definition is.Which means that either the Proc Format code has to be submitted in that session or have the format in a permanent library and use system option FMTSEARCH to tell SAS to look in that library for format information in addition to the SAS system formats.&lt;/P&gt;
&lt;P&gt;And if you are using some other program to view the SAS data set I suspect you will be just plain out of luck.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 17:47:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-labels-showing-in-output-but-not-in-actual-sas7bdat-file/m-p/668121#M200213</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-09T17:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Value labels showing in output but not in actual .sas7bdat file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Value-labels-showing-in-output-but-not-in-actual-sas7bdat-file/m-p/668209#M200263</link>
      <description>&lt;P&gt;Thanks to both of you--this was driving me crazy trying to figure out!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 22:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Value-labels-showing-in-output-but-not-in-actual-sas7bdat-file/m-p/668209#M200263</guid>
      <dc:creator>robeldritch</dc:creator>
      <dc:date>2020-07-09T22:53:05Z</dc:date>
    </item>
  </channel>
</rss>

