<?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: use of proc format in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81841#M23572</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset as shown in the my first question, just with a lot more observations and with a variable YEAR which shall not be affected by the format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I have tried this code inspired by you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;proc format;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp; value $cmiss&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; 'b.'='.'&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; ' '=' '&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp; value nmiss&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; .=.&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;run;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;proc freq data=XXX;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables year*A / nocol nopercent missing;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format _numeric_ nmiss. _character_ $cmiss. year;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;run;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;but this just gives me that A only consist of " " and "other", the "." is included in "other".&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;Do you understand? I would like to know how to continue after the proc format step given that I have a data set with the name XXXX and the three variables YEAR, A, B? &lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;Best //&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Oct 2012 14:55:57 GMT</pubDate>
    <dc:creator>silasskovsbo</dc:creator>
    <dc:date>2012-10-01T14:55:57Z</dc:date>
    <item>
      <title>use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81837#M23568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have realised some strange problems with a command which should be quite simple, proc format. &lt;/P&gt;&lt;P&gt;The problem is as follows.&lt;/P&gt;&lt;P&gt;My data is like&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;A$&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt; B&lt;/SPAN&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;e&amp;nbsp;&amp;nbsp;&amp;nbsp; . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have as seen above both missing data for the character variable, A$, shich is given by "." and " "&lt;/P&gt;&lt;P&gt;I want to use proc format to change the format so the data looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;A$&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt; B&lt;/SPAN&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; other&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; other&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;other&amp;nbsp;&amp;nbsp;&amp;nbsp; . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is because I then can make a proc freq which gives me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="51" style="border: 1px solid rgb(0, 0, 0); width: 330px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;.&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;other&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somebody who can help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, Silas, Aarhus University&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 13:26:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81837#M23568</guid>
      <dc:creator>silasskovsbo</dc:creator>
      <dc:date>2012-10-01T13:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81838#M23569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure why you would want to do that, but one way you could do it is by using something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp; value $cmiss&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 'b.'='.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ' '=' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; value nmiss&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; .=.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options missing=' ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile cards truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input @;&lt;/P&gt;&lt;P&gt;&amp;nbsp; _infile_=tranwrd(_infile_,'.','b.');&lt;/P&gt;&lt;P&gt;&amp;nbsp; format a $cmiss. b nmiss.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input a $2. b;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;. 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;e&amp;nbsp; &lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 14:11:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81838#M23569</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-01T14:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81839#M23570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Arthur.&lt;/P&gt;&lt;P&gt;Thanks for the fast answer, i see it works for&amp;nbsp; with your code, but unfortunate it still not works with my original.&lt;/P&gt;&lt;P&gt;I have a data set with the variables YEAR and AKASSE. AKASSE does have codes " ", "." and other numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I only use the proc format of yours I only get " " and "other" in my proc freq results and&amp;nbsp; "." are included in "other".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you understand?&lt;/P&gt;&lt;P&gt;So how can I use the proc format properly on the original data set? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again thanks! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 14:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81839#M23570</guid>
      <dc:creator>silasskovsbo</dc:creator>
      <dc:date>2012-10-01T14:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81840#M23571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand what your data look like.&amp;nbsp; You will probably have to provide an example in the form of a datastep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are saying that you have both blank and . values for both numeric and character variables, then you might be able to achieve what you want with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp; value $cmiss&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; '.b'='.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ' '=' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; value nmiss&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; .b=' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; .=.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options missing=' ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile cards truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input @;&lt;/P&gt;&lt;P&gt;&amp;nbsp; _infile_=tranwrd(_infile_,'.','.b');&lt;/P&gt;&lt;P&gt;&amp;nbsp; format a $cmiss. b nmiss.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input a $2. b;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;. 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;e&amp;nbsp; &lt;/P&gt;&lt;P&gt;f .&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 14:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81840#M23571</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-01T14:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81841#M23572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset as shown in the my first question, just with a lot more observations and with a variable YEAR which shall not be affected by the format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I have tried this code inspired by you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;proc format;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp; value $cmiss&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; 'b.'='.'&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; ' '=' '&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp; value nmiss&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; .=.&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;run;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;proc freq data=XXX;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables year*A / nocol nopercent missing;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format _numeric_ nmiss. _character_ $cmiss. year;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;run;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;but this just gives me that A only consist of " " and "other", the "." is included in "other".&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;Do you understand? I would like to know how to continue after the proc format step given that I have a data set with the name XXXX and the three variables YEAR, A, B? &lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;Best //&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 14:55:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81841#M23572</guid>
      <dc:creator>silasskovsbo</dc:creator>
      <dc:date>2012-10-01T14:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81842#M23573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Btw the reason I need to do is because when the danish statstics publics new data there is the problem that for character-variables it happens that missing data for some years are given "." and for other years are given " ". So at the institute of Economy in Aarhus we need to find out what years missing data is given the one or the other value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 15:12:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81842#M23573</guid>
      <dc:creator>silasskovsbo</dc:creator>
      <dc:date>2012-10-01T15:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81843#M23574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the following do what you need?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format;&lt;/P&gt;&lt;P&gt;&amp;nbsp; value $cmiss&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; '.b'='.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ' '=' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; value nmiss&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; .b=' '&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; .=.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; other='other'&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options missing='.';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data xxx;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile cards truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input @;&lt;/P&gt;&lt;P&gt;&amp;nbsp; _infile_=tranwrd(_infile_,'.','.b');&lt;/P&gt;&lt;P&gt;&amp;nbsp; input year a $2. b;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;2009 . 3&lt;/P&gt;&lt;P&gt;2010&amp;nbsp;&amp;nbsp; 4&lt;/P&gt;&lt;P&gt;2011 e &lt;/P&gt;&lt;P&gt;2012 f .&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=XXX;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tables year*A / nocol nopercent missing;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; format _numeric_ nmiss. _character_ $cmiss. year;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 15:17:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81843#M23574</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-10-01T15:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81844#M23575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your requirements are nearly clear, but ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If A and B fall into the "other" category, do you need them broken down by year?&amp;nbsp; If not, you might consider a new variable entirely:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if B=. then B_new = year;&lt;/P&gt;&lt;P&gt;else b_new=B;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then run the PROC FREQ on B_new.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For A, it's a little trickier, since you have to make sure A has a length of at least 4.&amp;nbsp; Assuming it does:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if A in (' ', '.') then A_new = put(year,4.);&lt;/P&gt;&lt;P&gt;else A_new = A;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then run the PROC FREQ on A_new.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depends on what you are trying to find out.&amp;nbsp; And if you can afford to run multiple PROC FREQs, one for each variable, skip all the complexity:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tables year;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where B=.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; tables year;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where A in (' ', '.');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, all of this is dependent on whether I'm interpreting the problem correctly or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 17:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81844#M23575</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-10-01T17:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81845#M23576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works fine for me (see below).&lt;/P&gt;&lt;P&gt;Do you want the blanks and periods to be distinct categories?&lt;/P&gt;&lt;P&gt;Did you remember to use the MISSING option in the PROC FREQ code?&lt;/P&gt;&lt;P&gt;Are you sure that the periods are getting into the SAS dataset?&amp;nbsp; If you are reading from a text file SAS normally converts '.' to ' '.&amp;nbsp; You can prevent this by using $CHAR informat instead of $ informat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;a=' '; output;&lt;/P&gt;&lt;P&gt;a='.'; output;&lt;/P&gt;&lt;P&gt;a='X'; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc format ;&lt;/P&gt;&lt;P&gt;value $a ' '=' ' '.'='.' other='Z';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc freq ;&lt;/P&gt;&lt;P&gt;tables a / missing&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;format a $a.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;The FREQ Procedure&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cumulative&amp;nbsp;&amp;nbsp;&amp;nbsp; Cumulative&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;a&amp;nbsp;&amp;nbsp;&amp;nbsp; Frequency&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Percent&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Frequency&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Percent&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33.33&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33.33&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33.33&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 66.67&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Z&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 33.33&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100.00&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2012 18:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81845#M23576</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-01T18:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81846#M23577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Tom.&lt;/P&gt;&lt;P&gt;Your program does also work for me with the data set you make.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But unfortunate - and I do not understand why - it still does not work when I use the program on my original data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To show my problem more specific below&amp;nbsp; I have uploaded my problemativ results:&lt;/P&gt;&lt;P&gt;This is the result when I do proc freq on original data&lt;/P&gt;&lt;P&gt;&lt;IMG alt="akasse_freq.png" class="jive-image" height="132" src="https://communities.sas.com/legacyfs/online/2604_akasse_freq.png" style="width: 310px; height: 132.85714285714286px;" width="310" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I use your format and I then have this result:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="akasse_freq_format.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/2605_akasse_freq_format.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is clearly wrong.&lt;/P&gt;&lt;P&gt;Do you have any idea on how it fails. I need three categories 1: '.' 2: ' ' 3: 'other'&lt;/P&gt;&lt;P&gt;And it works perfect for me when I use your data set?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank again! Best / Silas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 10:39:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81846#M23577</guid>
      <dc:creator>silasskovsbo</dc:creator>
      <dc:date>2012-10-08T10:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: use of proc format</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81847#M23578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for help everybody... Problem seems to be solved now! :smileygrin:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 13:54:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/use-of-proc-format/m-p/81847#M23578</guid>
      <dc:creator>silasskovsbo</dc:creator>
      <dc:date>2012-10-08T13:54:15Z</dc:date>
    </item>
  </channel>
</rss>

