<?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: SAS proc format consequence problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896577#M354269</link>
    <description>I see. Thanks for your opinion!</description>
    <pubDate>Sun, 01 Oct 2023 02:34:50 GMT</pubDate>
    <dc:creator>bbibbi_yc</dc:creator>
    <dc:date>2023-10-01T02:34:50Z</dc:date>
    <item>
      <title>SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896006#M354003</link>
      <description>&lt;P&gt;Hi, this is my code about proc format and the outcome.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="截圖 2023-09-27 下午4.23.42.png" style="width: 508px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88367iB626DF31CC6F581E/image-size/large?v=v2&amp;amp;px=999" role="button" title="截圖 2023-09-27 下午4.23.42.png" alt="截圖 2023-09-27 下午4.23.42.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="截圖 2023-09-27 下午4.23.22.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88368iE334F0DA518EF774/image-size/large?v=v2&amp;amp;px=999" role="button" title="截圖 2023-09-27 下午4.23.22.png" alt="截圖 2023-09-27 下午4.23.22.png" /&gt;&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;And I got a note:&lt;/P&gt;&lt;DIV class=""&gt;NOTE: Format EDU is already on the library WORK.FORMATS.&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: Format EDU has been output.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I am wondering where is my outcome about the proc format.&lt;/DIV&gt;&lt;DIV class=""&gt;Thank u.&lt;/DIV&gt;</description>
      <pubDate>Wed, 27 Sep 2023 08:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896006#M354003</guid>
      <dc:creator>bbibbi_yc</dc:creator>
      <dc:date>2023-09-27T08:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896008#M354004</link>
      <description>You copied some notes you received about the EDU format.  Where did you find those notes?</description>
      <pubDate>Wed, 27 Sep 2023 09:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896008#M354004</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2023-09-27T09:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896009#M354005</link>
      <description>&lt;P&gt;NOTE in the log does not indicate a problem. It is just providing information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In PROC FREQ, you have to assign the format(s) to the variable(s). You have not done that. I'm sure that your class notes explain how to do that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Side note: if you are going to assign a format, use proper proper capitalization, proper grammar and so on. For example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;value mar 1='Single' ... ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The reason you use formats is to make something more readable and more meaningful; if you want to make things more readable, use proper capitalization and grammar.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 11:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896009#M354005</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-09-27T11:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896082#M354040</link>
      <description>&lt;P&gt;In the diary.&lt;/P&gt;&lt;P&gt;And now I use another ways but still not solve the problem.&lt;/P&gt;&lt;P&gt;Thank u.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="螢幕擷取畫面 2023-09-27 231808.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88384i0363D4E9F681EEBA/image-size/large?v=v2&amp;amp;px=999" role="button" title="螢幕擷取畫面 2023-09-27 231808.png" alt="螢幕擷取畫面 2023-09-27 231808.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="螢幕擷取畫面 2023-09-27 231944.png" style="width: 709px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88385i7D9AD7FEC748EB8A/image-size/large?v=v2&amp;amp;px=999" role="button" title="螢幕擷取畫面 2023-09-27 231944.png" alt="螢幕擷取畫面 2023-09-27 231944.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 15:20:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896082#M354040</guid>
      <dc:creator>bbibbi_yc</dc:creator>
      <dc:date>2023-09-27T15:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896084#M354041</link>
      <description>Different problem. &lt;BR /&gt;&lt;BR /&gt;$EDU and EDU are different formats.&lt;BR /&gt;&lt;BR /&gt;$ indicates a character format.&lt;BR /&gt;&lt;BR /&gt;Your formats should be EDU and MAR&lt;BR /&gt;&lt;BR /&gt;format EDU edu. Mar mar.;&lt;BR /&gt;&lt;BR /&gt;For simplicity, I recommend not using the same name for your format and variable, I usually add the _fmt at the end. &lt;BR /&gt;&lt;BR /&gt;edu_fmt and mar_fmt are clearer.&lt;BR /&gt;&lt;BR /&gt;I'd show you how that works but I'm not going to type out your code. Please post your code as text in the future.</description>
      <pubDate>Wed, 27 Sep 2023 15:25:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896084#M354041</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-09-27T15:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896086#M354043</link>
      <description>&lt;P&gt;Your format MAR does not have a $ in the name. Same for EDU. In addition, there is no need to create a whole new data set to assign formats. The entire code you have written can be simplified&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename refile_1 '/home/...';
proc import datafile=refile_1 out=homework dbms=xlsx; 
getnames=yes;
run;
proc format;
    value edu 1='Illiteracy' 2='Elementary' 3='Junior' 4='Senior High' 5='College' 6='Graduate'; 
    value mar 1='Single' 2='Married' 3='Widowed' 4='Divorced'; /* Please note the use of capital letters in the formatted values */
run;
data homework_3;
    set homework;
    format edu edu. mar mar.;
    label edu='Educational Level' mar='Marital Status'; /* Please note the use of capital letters in the labels */
run;
proc freq data=homework_3;
    tables edu mar;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or even simpler, this only requires one data set named HOMEWORK&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;filename refile_1 '/home/...';
proc import datafile=refile_1 out=homework dbms=xlsx; 
getnames=yes;
run;
proc format;
    value edu 1='Illiteracy' 2='Elementary' 3='Junior' 4='Senior High' 5='College' 6='Graduate'; 
    value mar 1='Single' 2='Married' 3='Widowed' 4='Divorced'; /* Please note the use of capital letters in the formatted values */
run;
proc datasets library=work nolist;
    modify homework;
    format mar mar. edu edu.;
    label edu='Educational Level' mar='Marital Status'; /* Please note the use of capital letters in the labels */
run;
quit;
proc freq data=homework;
    tables edu mar;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Sep 2023 18:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896086#M354043</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-09-27T18:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896093#M354045</link>
      <description>&lt;P&gt;Hi bbibi:&lt;/P&gt;
&lt;P&gt;A few SAS procedures do not generate any reports by themselves, proc sort and proc format among them.&amp;nbsp; &amp;nbsp;The only way you'll know they've compiled is via a note in your log.&lt;/P&gt;
&lt;P&gt;rich&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 16:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896093#M354045</guid>
      <dc:creator>donricardo</dc:creator>
      <dc:date>2023-09-27T16:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896375#M354181</link>
      <description>&lt;P&gt;Hello, thank you for your response. I followed your advice, but still couldn't achieve the results I expected.&lt;/P&gt;&lt;P&gt;Why weren't the numbers replaced in the form?&lt;/P&gt;&lt;P&gt;Thank u.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="螢幕擷取畫面 2023-09-29 141706.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88417i0E1929CF4295DD2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="螢幕擷取畫面 2023-09-29 141706.png" alt="螢幕擷取畫面 2023-09-29 141706.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="螢幕擷取畫面 2023-09-29 141739.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88418iF1DEB32693C23168/image-size/large?v=v2&amp;amp;px=999" role="button" title="螢幕擷取畫面 2023-09-29 141739.png" alt="螢幕擷取畫面 2023-09-29 141739.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 06:19:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896375#M354181</guid>
      <dc:creator>bbibbi_yc</dc:creator>
      <dc:date>2023-09-29T06:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896376#M354182</link>
      <description>&lt;P&gt;Hello, that means I can't see the 'Single' or other else in my table?&lt;/P&gt;&lt;P&gt;It sounds like a stupid question, but I really don't understand. Thank you for your patient response.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 06:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896376#M354182</guid>
      <dc:creator>bbibbi_yc</dc:creator>
      <dc:date>2023-09-29T06:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896384#M354186</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/455055"&gt;@bbibbi_yc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, thank you for your response. I followed your advice, but still couldn't achieve the results I expected.&lt;/P&gt;
&lt;P&gt;Why weren't the numbers replaced in the form?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because you did not use the formats in the FREQ procedure, as was already mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please do not post pictures of code or logs in the future. Always &lt;STRONG&gt;(ALWAYS) &lt;/STRONG&gt;copy/paste the text into the appropriate windows (see your "welcome" email when you signed up to the forum). This allows us to quickly annotate and correct your work.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 08:27:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896384#M354186</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-09-29T08:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896415#M354198</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/455055"&gt;@bbibbi_yc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, that means I can't see the 'Single' or other else in my table?&lt;/P&gt;
&lt;P&gt;It sounds like a stupid question, but I really don't understand. Thank you for your patient response.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Formats impact how the value is DISPLAYED, not the value that is STORED.&lt;/P&gt;
&lt;P&gt;So if you have a format that display the number 1 as the string Single then the number 1 is what is stored in the dataset.&amp;nbsp; If the format is being used when you "look" at the data then you will see Single but the value in the dataset is still the number 1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in the tabular report (what I normally mean when I use the word TABLE) produced by PROC FREQ the formatted value is displayed.&amp;nbsp; So if the variable has a format attached that converts 1 to Single then Single will show up in the report.&amp;nbsp; If there is no format attached to a number than SAS will normally display it using the BEST12. format.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 13:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896415#M354198</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-09-29T13:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896453#M354212</link>
      <description>&lt;P&gt;Post the log as well to indicate if something went wrong somewhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, test this use case which should work.&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 $ sex_fmt
'F' = 'Female'
'M' = 'Male';

value age_fmt
low - 9 = 'Child'
10-12 = 'Tween'
13-16 = 'Teen'
16 - high = 'Young Adult';
run;

data class;
set sashelp.class;
format age age_fmt. sex $sex_fmt.;
run;

proc freq data=class;
tables age sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/455055"&gt;@bbibbi_yc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, thank you for your response. I followed your advice, but still couldn't achieve the results I expected.&lt;/P&gt;
&lt;P&gt;Why weren't the numbers replaced in the form?&lt;/P&gt;
&lt;P&gt;Thank u.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="螢幕擷取畫面 2023-09-29 141706.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88417i0E1929CF4295DD2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="螢幕擷取畫面 2023-09-29 141706.png" alt="螢幕擷取畫面 2023-09-29 141706.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="螢幕擷取畫面 2023-09-29 141739.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88418iF1DEB32693C23168/image-size/large?v=v2&amp;amp;px=999" role="button" title="螢幕擷取畫面 2023-09-29 141739.png" alt="螢幕擷取畫面 2023-09-29 141739.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 15:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896453#M354212</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-09-29T15:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896454#M354213</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/455055"&gt;@bbibbi_yc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, thank you for your response. I followed your advice, but still couldn't achieve the results I expected.&lt;/P&gt;
&lt;P&gt;Why weren't the numbers replaced in the form?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because you did not use the formats in the FREQ procedure, as was already mentioned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please do not post pictures of code or logs in the future. Always &lt;STRONG&gt;(ALWAYS) &lt;/STRONG&gt;copy/paste the text into the appropriate windows (see your "welcome" email when you signed up to the forum). This allows us to quickly annotate and correct your work.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If the formats are applied at the data set level, proc freq should be using them. Either it's a language incompatibility issue or there's an error in the log somewhere we can't see are my guesses. For language incompatibility, I've seen SAS Studio not work correctly in Chinese keyboard/dialects.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 15:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896454#M354213</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-09-29T15:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896456#M354214</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/455055"&gt;@bbibbi_yc&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, that means I can't see the 'Single' or other else in my table?&lt;/P&gt;
&lt;P&gt;It sounds like a stupid question, but I really don't understand. Thank you for your patient response.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;WHICH dataset (not table at this point). You have at least two data sets shown in a picture of your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS variables &lt;STRONG&gt;always&lt;/STRONG&gt; have a format assigned. The format controls how SAS will display the values by default. In many cases for numeric values you SAS will default to something like BEST12. , which means it will make an attempt to display the value in 12 characters. IF you create a custom format and permanently assign it to a variable then the format has to be available to the current session for use, otherwise SAS will fall back on the default. To have a custom format available in a session you either have to run the code to recreate the format OR create the format(s) in a permanent library that is active and add the path to that format storage with the SAS option FMTSEARCH, which tells SAS where to look for formats in addition to the SAS default formats. For beginning SAS users I recommend rerunning the format code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is actually a SAS option that will prevent use of a data set with a custom format that SAS can't find. An example from my LOG setting the option and then attempting to use a format that is not defined:&lt;/P&gt;
&lt;PRE&gt;52   options fmterr;
53
54   proc freq data=sashelp.class;
55      tables sex;
56      format sex $mysexformat.;
ERROR: The format $MYSEXFORMAT was not found or could not be loaded.
57   run;


&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Sep 2023 15:13:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896456#M354214</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-09-29T15:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896577#M354269</link>
      <description>I see. Thanks for your opinion!</description>
      <pubDate>Sun, 01 Oct 2023 02:34:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896577#M354269</guid>
      <dc:creator>bbibbi_yc</dc:creator>
      <dc:date>2023-10-01T02:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896579#M354270</link>
      <description>&lt;PRE&gt;&lt;CODE class=""&gt;/*import data*/
Filename refile_1 '/home/u63518324/sasuser.v94/Epi_test.xls';
proc import datafile=refile_1
out=homework
dbms=xls;
getnames=yes;
run;

/*change label, format*/

proc format;
    value edu 1='Illiteracy' 2='Elementary' 3='Junior' 4='Senior High' 5='College' 6='Graduate'; 
    value mar 1='Single' 2='Married' 3='Widowed' 4='Divorced';
run;
data homework_3;
    set homework;
    format edu edu. mar mar.;
    label edu='Educational Level' mar='Marital Status';
run;
options nofmterr;
proc freq data=homework_3;
    tables edu mar;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Hello, this is my code.&amp;nbsp;I'm wondering where the problem is that prevents me from opening my data display results. Also, the following error still appears in the log.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt; 85             format edu edu. mar mar.;
                           ____
                           484
 NOTE 484-185: Format $EDU was not found or could not be loaded.
 
 85       !     format edu edu. mar mar.;
                                    ____
                                    484
 NOTE 484-185: Format $MAR was not found or could not be loaded.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank u so much.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2023 03:06:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896579#M354270</guid>
      <dc:creator>bbibbi_yc</dc:creator>
      <dc:date>2023-10-01T03:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896580#M354271</link>
      <description>&lt;P&gt;So that means that EDU and MAR were created as CHARACTER variables by PROC IMPORT.&lt;/P&gt;
&lt;P&gt;If you expected them to be numeric then you need to look at the XLS file and find out why they are not numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you could change the format definition to define a character format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;value $mar '1'='Single' '2'='Married' '3'='Widowed' '4'='Divorced';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But be careful because the string '1' and the string ' 1' are two different strings.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2023 03:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896580#M354271</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-10-01T03:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS proc format consequence problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896586#M354276</link>
      <description>&lt;P&gt;It's indeed not in numerical form. Thank you very much for helping me identify the problem. I'm sorry for taking up so much of everyone's time.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2023 14:25:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-proc-format-consequence-problem/m-p/896586#M354276</guid>
      <dc:creator>bbibbi_yc</dc:creator>
      <dc:date>2023-10-01T14:25:16Z</dc:date>
    </item>
  </channel>
</rss>

