<?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 Reporting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491692#M129014</link>
    <description>&lt;P&gt;Thank you for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the following to get my desired outcome.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;input brand $ Freq Freq1 COUNT;&lt;BR /&gt;datalines;&lt;BR /&gt;A 2 3 8&lt;BR /&gt;B 3 5 4&lt;BR /&gt;C 4 6 2&lt;BR /&gt;D 5 1 1&lt;BR /&gt;E 6 5 8&lt;BR /&gt;F 7 7 9&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;if 0 then set test;&lt;BR /&gt;if _n_=1 then do;&lt;BR /&gt;call missing(of _all_);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;set test;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want2;&lt;BR /&gt;set want;&lt;BR /&gt;if brand =" " then do;&lt;BR /&gt;output;&lt;BR /&gt;brand = 'Title1' ;Freq = . ; Freq1=.; COUNT=.;&lt;BR /&gt;end;&lt;BR /&gt;if brand = "D" then do;&lt;BR /&gt;output;&lt;BR /&gt;brand = 'Title2' ;Freq = . ; Freq1=.; COUNT=.;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;else output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I can see that your solution is better. Thank you again.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Aug 2018 16:50:28 GMT</pubDate>
    <dc:creator>75063</dc:creator>
    <dc:date>2018-08-31T16:50:28Z</dc:date>
    <item>
      <title>SAS Reporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491499#M128909</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data frame as below -&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;input brand $ Freq Freq1 COUNT;&lt;BR /&gt;datalines;&lt;BR /&gt;A 2 3 8&lt;BR /&gt;B 3 5 4&lt;BR /&gt;C 4 6 2&lt;BR /&gt;D 5 1 1&lt;BR /&gt;E 6 5 8&lt;BR /&gt;F 7 7 9&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To insert blanks at multiple locations in the observations i use this code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set test;&lt;BR /&gt;output;&lt;BR /&gt;if _n_=3 or _n_=5;&lt;BR /&gt;call missing (of _all_);&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=want;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a procedure to introduce sub headings in place of the blanks - as shown in the desired output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 03:43:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491499#M128909</guid>
      <dc:creator>75063</dc:creator>
      <dc:date>2018-08-31T03:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Reporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491501#M128911</link>
      <description>&lt;P&gt;If i am using this code -&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set test;&lt;BR /&gt;if brand ="C" or brand= "E" then do;&lt;BR /&gt;output;&lt;BR /&gt;brand = 'Title' ;Freq = .; Freq1=. ; COUNT=.;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;else output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I am getting the same title 'Title' for both the observations. However, I would like to have two different titles&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; ("Title1" and "Title2" ) in the two locations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 03:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491501#M128911</guid>
      <dc:creator>75063</dc:creator>
      <dc:date>2018-08-31T03:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Reporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491507#M128914</link>
      <description>&lt;P&gt;This will give you what you are asking for.&amp;nbsp; There are better ways to do this, but here is a simple fix:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; want;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; brand $&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;25&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; test;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; brand =&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"C"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; or brand= &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"E"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; brand = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"C"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; brand = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'This is the first title '&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ;Freq = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;; Freq1=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; ; COUNT=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; brand = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"E"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;then&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; brand = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'This is the second title '&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;Freq = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;; Freq1=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; ; COUNT=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;else&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 04:25:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491507#M128914</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-08-31T04:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Reporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491509#M128915</link>
      <description>&lt;P&gt;I posted the solution in your previous post using PROC REPORT. Please do not post your question multiple times.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 04:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491509#M128915</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-08-31T04:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Reporting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491692#M129014</link>
      <description>&lt;P&gt;Thank you for your reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used the following to get my desired outcome.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;input brand $ Freq Freq1 COUNT;&lt;BR /&gt;datalines;&lt;BR /&gt;A 2 3 8&lt;BR /&gt;B 3 5 4&lt;BR /&gt;C 4 6 2&lt;BR /&gt;D 5 1 1&lt;BR /&gt;E 6 5 8&lt;BR /&gt;F 7 7 9&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;if 0 then set test;&lt;BR /&gt;if _n_=1 then do;&lt;BR /&gt;call missing(of _all_);&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;set test;&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want2;&lt;BR /&gt;set want;&lt;BR /&gt;if brand =" " then do;&lt;BR /&gt;output;&lt;BR /&gt;brand = 'Title1' ;Freq = . ; Freq1=.; COUNT=.;&lt;BR /&gt;end;&lt;BR /&gt;if brand = "D" then do;&lt;BR /&gt;output;&lt;BR /&gt;brand = 'Title2' ;Freq = . ; Freq1=.; COUNT=.;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;else output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I can see that your solution is better. Thank you again.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 16:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Reporting/m-p/491692#M129014</guid>
      <dc:creator>75063</dc:creator>
      <dc:date>2018-08-31T16:50:28Z</dc:date>
    </item>
  </channel>
</rss>

