<?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: Controlling the order of column &amp; row titles in proc format? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-the-order-of-column-row-titles-in-proc-format/m-p/91163#M26040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So did you try the code I told you a couple of days ago ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data x;
input a &amp;amp; $10. b &amp;amp; $10.;
cards;
.&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;&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; 
Current&amp;nbsp;&amp;nbsp; Current
1 - 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Delinquent
30 - 60&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default
60 - 90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NPNA
90+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current 
NPNA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current
;
run;
proc format ;
&amp;nbsp; value $ fmt
&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; Missing'
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Current' = '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current'
&amp;nbsp;&amp;nbsp;&amp;nbsp; '1 - 30'&amp;nbsp;&amp;nbsp;&amp;nbsp; = '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 - 30' 
&amp;nbsp;&amp;nbsp;&amp;nbsp; '30 - 60'&amp;nbsp;&amp;nbsp; = '&amp;nbsp;&amp;nbsp;&amp;nbsp; 30 - 60'
&amp;nbsp;&amp;nbsp;&amp;nbsp; '60 - 90'&amp;nbsp;&amp;nbsp; ='&amp;nbsp;&amp;nbsp; 60 - 90' 
&amp;nbsp;&amp;nbsp;&amp;nbsp; '90+'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ='&amp;nbsp; 90+' 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Default'=&amp;nbsp; 'Default'
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Delinquent'= ' Delinquent'
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'NPNA'&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'NPNA' 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ;
run;
proc freq order=formatted;
tables b*a/missing ;
format a b $fmt.;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2012 02:13:56 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2012-10-11T02:13:56Z</dc:date>
    <item>
      <title>Controlling the order of column &amp; row titles in proc format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-the-order-of-column-row-titles-in-proc-format/m-p/91161#M26038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: Arial;"&gt;Hi Forum,&lt;/STRONG&gt;&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-size: 12pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: Arial;"&gt;I ran a cross tab like below.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: Arial;"&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: Arial;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: Arial;"&gt;freq&lt;/STRONG&gt; &lt;SPAN style="font-family: Arial; background: white; color: blue;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: Arial; background: white; color: black;"&gt;=a.have ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-indent: 0.5in;"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;SPAN style="font-family: Arial; background: white; color: blue;"&gt;tables&lt;/SPAN&gt;&lt;SPAN style="font-family: Arial; background: white; color: black;"&gt; delinquency_band*arrears_band/ &lt;/SPAN&gt;&lt;SPAN style="font-family: Arial; background: white; color: blue;"&gt;missing&lt;/SPAN&gt; &lt;SPAN style="font-family: Arial; background: white; color: blue;"&gt;nocol&lt;/SPAN&gt; &lt;SPAN style="font-family: Arial; background: white; color: blue;"&gt;nopercent&lt;/SPAN&gt; &lt;SPAN style="font-family: Arial; background: white; color: blue;"&gt;norow&lt;/SPAN&gt;&lt;SPAN style="font-family: Arial; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: Arial;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: Arial; background: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It outputted a table like below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="WIDTH: 606px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl30" colspan="9" height="18" style="border-right: #333333 1pt solid;" width="606"&gt;Table of Delinquency_Band by Arrears_Band&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl33" colspan="2" height="36" rowspan="2" style="border-bottom: #333333 1pt solid; border-right: #333333 1pt solid;" width="158"&gt; &lt;/TD&gt;&lt;TD class="xl37" colspan="6" style="TEXT-ALIGN: center; BORDER-LEFT: medium none; BORDER-RIGHT: #333333 1pt solid;" width="384"&gt;&lt;SPAN style="color: #ff0000;"&gt;Arrears_Band&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl40" rowspan="2" style="border-bottom: #333333 1pt solid; border-top: medium none;" width="64"&gt;Total&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl22" height="18" style="border-left: medium none; border-top: medium none;" width="64"&gt;1 - 30&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;30 - 60&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;60 - 90&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;90 +&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;Current&lt;/TD&gt;&lt;TD class="xl23" style="border-left: medium none; border-top: medium none;" width="64"&gt;NPNA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl24" height="52" style="border-top: medium none;" width="94"&gt;&lt;SPAN style="color: #ff0000;"&gt;Delinquency_Band&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl24" style="border-left: medium none; border-top: medium none;" width="64"&gt; &lt;/TD&gt;&lt;TD class="xl42" rowspan="2" style="border-top: medium none;"&gt;104251&lt;/TD&gt;&lt;TD class="xl44" rowspan="2" style="border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl44" rowspan="2" style="border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl44" rowspan="2" style="border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl44" rowspan="2" style="border-top: medium none;"&gt;54782&lt;/TD&gt;&lt;TD class="xl44" rowspan="2" style="border-top: medium none;"&gt;0&lt;/TD&gt;&lt;TD class="xl45" rowspan="2" style="border-top: medium none;"&gt;????&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="35" style="border-top: medium none;" width="94"&gt;Current&lt;/TD&gt;&lt;TD class="xl26" style="border-left: medium none; border-top: medium none;" width="64"&gt;Frequency&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="36" style="border-top: medium none;" width="94"&gt;Default&lt;/TD&gt;&lt;TD class="xl26" style="border-left: medium none; border-top: medium none;" width="64"&gt;Frequency&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;1297&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl27"&gt;1297&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="36" style="border-top: medium none;" width="94"&gt;Delinquen&lt;/TD&gt;&lt;TD class="xl26" style="border-left: medium none; border-top: medium none;" width="64"&gt;Frequency&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;25487&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl27"&gt;325&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl23" height="36" style="border-top: medium none;" width="94"&gt;NPNA&lt;/TD&gt;&lt;TD class="xl26" style="border-left: medium none; border-top: medium none;" width="64"&gt;Frequency&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;0&lt;/TD&gt;&lt;TD class="xl25"&gt;25078&lt;/TD&gt;&lt;TD class="xl27"&gt;25078&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl24" height="22" style="border-top: medium none;" width="94"&gt; &lt;/TD&gt;&lt;TD class="xl24" style="border-left: medium none; border-top: medium none;" width="64"&gt; &lt;/TD&gt;&lt;TD class="xl28"&gt;????&lt;/TD&gt;&lt;TD class="xl28"&gt;????&lt;/TD&gt;&lt;TD class="xl28"&gt;????&lt;/TD&gt;&lt;TD class="xl28"&gt;????&lt;/TD&gt;&lt;TD class="xl28"&gt;????&lt;/TD&gt;&lt;TD class="xl29"&gt;????&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: yellow; font-size: 10pt;"&gt;Question:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I want to revise the row and column title order of the above table like this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; text-decoration: underline;"&gt;Row order (i.e. &lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Arial; text-decoration: underline;"&gt;Arrears_Band order)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt;Missing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 – 30&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; 30 – 60&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; 60 – 90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 90+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NPNA&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; text-decoration: underline;"&gt;Column order (i.e. Delinquency&lt;/SPAN&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: Arial; text-decoration: underline;"&gt;_Band order)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt;Missing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Delinquent&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; Default&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NPNA&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: Arial;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; text-decoration: underline;"&gt;What I have done:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: green; font-size: 11pt;"&gt;/* create format for sort order of Arrears_Band&amp;nbsp; */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;format&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;invalue&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; Arrears_Band &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'CURRENT'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; =&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'1-30'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'30-60'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;&amp;nbsp;&amp;nbsp; =&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'60-90'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;&amp;nbsp;&amp;nbsp; =&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;4&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'90+'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'NPNA'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;99&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;value&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; ArrearsText &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'Current'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'1 - 30'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'30 - 60'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;4&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'60 - 90'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;5&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'90 +'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'NPNA'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: teal; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;99&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: purple; font-size: 11pt;"&gt;'missing and misscoded!'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;freq&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;=a.ARR_HISTRY_FILTRD_HAPHAZ_RMVD;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;tables&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; delinquency_band*arrears_band/ &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;missing&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;nocol&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;nopercent&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;norow&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: blue; font-size: 11pt;"&gt;format&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; background: white; color: teal; font-size: 11pt;"&gt;ArrearsText.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 11pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; background: white; color: black; font-size: 11pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This doesn’t work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone let me know what is the problem with my code?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mirisage&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 15:08:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-the-order-of-column-row-titles-in-proc-format/m-p/91161#M26038</guid>
      <dc:creator>Mirisage</dc:creator>
      <dc:date>2012-10-10T15:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the order of column &amp; row titles in proc format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-the-order-of-column-row-titles-in-proc-format/m-p/91162#M26039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The syntax of your FORMAT statement is wrong.&amp;nbsp; Should have a variable name followed by optional format name.&lt;/P&gt;&lt;P&gt;Also I did not see anything in the posted code to see where you used to INFORMAT to convert the values of Arrears_Band from text strings to numbers. (Note you cannot convert and existing variable from character to number, you will need to create a new one. You can use RENAME statements to change the name back if you want.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your Arrears_Band variable actually has the values 1,2,...,99 try running the PROC FREQ with the format statement:&lt;/P&gt;&lt;P&gt;format arrears_band ;&lt;/P&gt;&lt;P&gt;This should give you column headings of 1,2,3,... etc.&lt;/P&gt;&lt;P&gt;To get missing to appear first you might want to recode it from 99 to 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 16:13:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-the-order-of-column-row-titles-in-proc-format/m-p/91162#M26039</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-10-10T16:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the order of column &amp; row titles in proc format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-the-order-of-column-row-titles-in-proc-format/m-p/91163#M26040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So did you try the code I told you a couple of days ago ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data x;
input a &amp;amp; $10. b &amp;amp; $10.;
cards;
.&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;&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; 
Current&amp;nbsp;&amp;nbsp; Current
1 - 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Delinquent
30 - 60&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Default
60 - 90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NPNA
90+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current 
NPNA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current
;
run;
proc format ;
&amp;nbsp; value $ fmt
&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; Missing'
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Current' = '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current'
&amp;nbsp;&amp;nbsp;&amp;nbsp; '1 - 30'&amp;nbsp;&amp;nbsp;&amp;nbsp; = '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 - 30' 
&amp;nbsp;&amp;nbsp;&amp;nbsp; '30 - 60'&amp;nbsp;&amp;nbsp; = '&amp;nbsp;&amp;nbsp;&amp;nbsp; 30 - 60'
&amp;nbsp;&amp;nbsp;&amp;nbsp; '60 - 90'&amp;nbsp;&amp;nbsp; ='&amp;nbsp;&amp;nbsp; 60 - 90' 
&amp;nbsp;&amp;nbsp;&amp;nbsp; '90+'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ='&amp;nbsp; 90+' 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Default'=&amp;nbsp; 'Default'
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Delinquent'= ' Delinquent'
&amp;nbsp;&amp;nbsp;&amp;nbsp; 'NPNA'&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'NPNA' 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ;
run;
proc freq order=formatted;
tables b*a/missing ;
format a b $fmt.;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2012 02:13:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-the-order-of-column-row-titles-in-proc-format/m-p/91163#M26040</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-10-11T02:13:56Z</dc:date>
    </item>
  </channel>
</rss>

