<?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: Simple proc format not working - Formats not applied in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Simple-proc-format-not-working-Formats-not-applied/m-p/728588#M226698</link>
    <description>I think the rules have recently changed (and you could correct me if I'm wrong), but now I know that the format names should be exactly the same as the variable names.&lt;BR /&gt;&lt;BR /&gt;That worked. Thank you so much, qoit!&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 23 Mar 2021 22:20:41 GMT</pubDate>
    <dc:creator>detective_jdee_</dc:creator>
    <dc:date>2021-03-23T22:20:41Z</dc:date>
    <item>
      <title>Simple proc format not working - Formats not applied</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simple-proc-format-not-working-Formats-not-applied/m-p/728582#M226696</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I submitted the following code onto a program in SAS ODA account:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Data new;&lt;BR /&gt;set cert.input44;&lt;BR /&gt;drop bp_status weight_status smoking_status;&lt;BR /&gt;if cholesterol=. then chol_status=.; &lt;BR /&gt;else if cholesterol&amp;lt;200 then chol_status=1;&lt;BR /&gt;else if 200&amp;lt;=cholesterol&amp;lt;=239 then chol_status=2;&lt;BR /&gt;else if cholesterol&amp;gt;=240 then chol_status=3; &lt;BR /&gt;run;&lt;BR /&gt;proc format;&lt;BR /&gt;value chol_status 1="Safe" 2="High to Borderline" 3="High";&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc freq data=new;&lt;BR /&gt;table chol_status;&lt;BR /&gt;format chol_status cholcat.; &lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;This exactly follows the structure of examples that have worked for me before. However, this time when I run the proc freq step, the "Safe" "High to Borderline" and "High" formats are not applied to the output, and I'm not sure why that is.&lt;BR /&gt;How could I make sure my formats are correctly applied?&amp;nbsp;&lt;BR /&gt;Help would be much appreciated.&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 21:53:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simple-proc-format-not-working-Formats-not-applied/m-p/728582#M226696</guid>
      <dc:creator>detective_jdee_</dc:creator>
      <dc:date>2021-03-23T21:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Simple proc format not working - Formats not applied</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simple-proc-format-not-working-Formats-not-applied/m-p/728585#M226697</link>
      <description>&lt;P&gt;Your format name is 'chol_status'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=new;&lt;/P&gt;
&lt;P&gt;table chol_status;&lt;/P&gt;
&lt;P&gt;format chol_status chol_status.; run&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 22:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simple-proc-format-not-working-Formats-not-applied/m-p/728585#M226697</guid>
      <dc:creator>qoit</dc:creator>
      <dc:date>2021-03-23T22:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Simple proc format not working - Formats not applied</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simple-proc-format-not-working-Formats-not-applied/m-p/728588#M226698</link>
      <description>I think the rules have recently changed (and you could correct me if I'm wrong), but now I know that the format names should be exactly the same as the variable names.&lt;BR /&gt;&lt;BR /&gt;That worked. Thank you so much, qoit!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Mar 2021 22:20:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simple-proc-format-not-working-Formats-not-applied/m-p/728588#M226698</guid>
      <dc:creator>detective_jdee_</dc:creator>
      <dc:date>2021-03-23T22:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Simple proc format not working - Formats not applied</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Simple-proc-format-not-working-Formats-not-applied/m-p/728589#M226699</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/375222"&gt;@detective_jdee_&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I think the rules have recently changed (and you could correct me if I'm wrong), &lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, they have not, rules for formats have not changed in decades ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;but now I know that the format names should be exactly the same as the variable names.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;... this is also incorrect. Your original code did not use the format name, that was the problem. One format can be applied to many variables, if you use the name of a format that has been defined.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 22:26:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Simple-proc-format-not-working-Formats-not-applied/m-p/728589#M226699</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-03-23T22:26:10Z</dc:date>
    </item>
  </channel>
</rss>

