<?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: proc format not working in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/504922#M135188</link>
    <description>Thank you! Code worked perfectly!</description>
    <pubDate>Tue, 16 Oct 2018 22:09:25 GMT</pubDate>
    <dc:creator>kmh</dc:creator>
    <dc:date>2018-10-16T22:09:25Z</dc:date>
    <item>
      <title>proc format not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/503562#M134584</link>
      <description>&lt;P&gt;Hello! I'm trying to label my variable "lmath" with "1=stag" "2=ag" and so forth &amp;nbsp;using proc format (coding below) &amp;nbsp;However, whenever I run the frequency table to check that proc format worked I get the table below. &amp;nbsp;The reason my labels are so short is I read somewhere the labels need to be less than 8 characters long, but shortening the labels did not work. I'm using SAS university edition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="proc_title_group"&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;lmath&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Frequency&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Percent&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Cumulative&lt;BR /&gt;Frequency&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Cumulative&lt;BR /&gt;Percent&lt;/STRONG&gt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&gt;&lt;P&gt;2.59&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;11598&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;100.00&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P class="c proctitle"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="c proctitle"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="c proctitle"&gt;proc format;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;value lmath 1='stag' 2='ag' 3='dis' 4'stdis';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq;&lt;BR /&gt;tables lmath;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated!!!!&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 20:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/503562#M134584</guid>
      <dc:creator>kmh</dc:creator>
      <dc:date>2018-10-11T20:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc format not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/503565#M134585</link>
      <description>&lt;P&gt;It looks like you are trying to FORMAT your variable, not label it. A LABEL is just a single longer description of the variable than the name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You defined the format you wanted to use, but you did not tell SAS to use it for any of your variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a FORMAT statement to your PROC step.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq;
  tables lmath;
  format lmath lmath. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the name of the format used with a variable is independent of the name of the variable.&amp;nbsp; You could 20 variables in your dataset that are each coded with 0 as No and 1 and Yes.&amp;nbsp; So you just need to define one NoYes. format and use it for all of them.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Oct 2018 20:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/503565#M134585</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-11T20:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc format not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/503615#M134615</link>
      <description>&lt;P&gt;Hello Kmh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I observed that, your code will not work because in PROC FORMAT for the last identifier 4 equal sign (=)&amp;nbsp; was missing . When you want to use format , you have to tell SAS .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="proc_title_group"&gt;&lt;P class="c proctitle"&gt;proc format;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;value lmath 1='stag' 2='ag' 3='dis' 4='stdis';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc freq;&lt;BR /&gt;tables lmath;&lt;/P&gt;&lt;P&gt;Format&amp;nbsp;&lt;SPAN&gt;lmath&amp;nbsp;lmath&amp;nbsp;.&lt;/SPAN&gt;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kindly try above code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 02:21:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/503615#M134615</guid>
      <dc:creator>singhsahab</dc:creator>
      <dc:date>2018-10-12T02:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: proc format not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/504920#M135187</link>
      <description>&lt;P&gt;This makes so much more sense! I really appreciate your help. Thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 22:08:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/504920#M135187</guid>
      <dc:creator>kmh</dc:creator>
      <dc:date>2018-10-16T22:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: proc format not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/504922#M135188</link>
      <description>Thank you! Code worked perfectly!</description>
      <pubDate>Tue, 16 Oct 2018 22:09:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-format-not-working/m-p/504922#M135188</guid>
      <dc:creator>kmh</dc:creator>
      <dc:date>2018-10-16T22:09:25Z</dc:date>
    </item>
  </channel>
</rss>

