<?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 template in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/template/m-p/485670#M126207</link>
    <description>&lt;P&gt;Good evening,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wanted to know if it is possible to get the following template output from a sas code. The input files from where I need to create the template are in excel.&amp;nbsp; The following is my query:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure how to get the branched out variable names. For example in the attached file that I have provided variable " Enrollment" has three sub variables namely 1. "2013" 2. "2014" and 3 "% Change".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, is it possible to highlight&amp;nbsp; variable names and filling the cells with color in sas code?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS on demand for academics.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking all in advance.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Aug 2018 06:41:23 GMT</pubDate>
    <dc:creator>75063</dc:creator>
    <dc:date>2018-08-10T06:41:23Z</dc:date>
    <item>
      <title>template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/template/m-p/485670#M126207</link>
      <description>&lt;P&gt;Good evening,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wanted to know if it is possible to get the following template output from a sas code. The input files from where I need to create the template are in excel.&amp;nbsp; The following is my query:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure how to get the branched out variable names. For example in the attached file that I have provided variable " Enrollment" has three sub variables namely 1. "2013" 2. "2014" and 3 "% Change".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Secondly, is it possible to highlight&amp;nbsp; variable names and filling the cells with color in sas code?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using SAS on demand for academics.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking all in advance.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 06:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/template/m-p/485670#M126207</guid>
      <dc:creator>75063</dc:creator>
      <dc:date>2018-08-10T06:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/template/m-p/485675#M126212</link>
      <description>&lt;P&gt;First of all, SAS does not have "cells". SAS has rows and columns.&lt;/P&gt;
&lt;P&gt;The columns are one-level only. In proc report, you can span headers over columns, but that's for reporting purposes only.&lt;/P&gt;
&lt;P&gt;Next. SAS variables contain characters or numbers. Coloring comes only into play, once again, when creating reports. Data in datasets does not have color, as it makes no sense in a SAS context.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 07:14:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/template/m-p/485675#M126212</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-10T07:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/template/m-p/485679#M126216</link>
      <description>&lt;P&gt;You can get there, it will take a fair bit of working through.&amp;nbsp; Some starters:&lt;/P&gt;
&lt;PRE&gt;ods excel file="want.xlsx" style=minimal;

proc report data=have nowd;
  columns main_status 
                 ("Enrolment" enrol_2013 enrol_2014 chg)
                 ("Work hours" ...;
  define main_status / "Main Status" style(column)={cellwidth=4cm};
  define enrol_2013 / "2013" style(column)={cellwidth=1cm};
  define...
run;

ods excel close;&lt;/PRE&gt;
&lt;P&gt;As you have not posted any test data in the form of a datastep, it is impossible to provide anything more than examples.&amp;nbsp; The above assumes a dataset which already has the calculations done in a datastep - which is a simpler way of working.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 07:54:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/template/m-p/485679#M126216</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-10T07:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/template/m-p/486192#M126457</link>
      <description>&lt;P&gt;Thank you for the starter code. I have attached the sample of the data set along with this post. Looking forward to further guidance in the code.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, after writing the following code -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Proc Report Data=&amp;nbsp;Sams nowd;&lt;BR /&gt;column FT (" sdfsfs" TERM_DESC roll );&lt;BR /&gt;define TERM_DESC / group;&lt;BR /&gt;define FT / group;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got the output as -&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; sdfsfsFT TERM_DESC roll&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;FULL TIME&lt;/TD&gt;&lt;TD&gt;Fall 2016&lt;/TD&gt;&lt;TD&gt;1566&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Fall 2017&lt;/TD&gt;&lt;TD&gt;1638&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PART TIME&lt;/TD&gt;&lt;TD&gt;Fall 2016&lt;/TD&gt;&lt;TD&gt;496&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Fall 2017&lt;/TD&gt;&lt;TD&gt;677&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is it possible to transpose the "Fall2016" and "Fall 2017" to columns from the Proc report step and have the "roll" variable as the rows so that the output looks like -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;FT&lt;/TD&gt;&lt;TD&gt;Fall 2016&lt;/TD&gt;&lt;TD&gt;Fall 2017&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;FULL TIME&lt;/TD&gt;&lt;TD&gt;1566&lt;/TD&gt;&lt;TD&gt;1638&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PART TIME&lt;/TD&gt;&lt;TD&gt;496&lt;/TD&gt;&lt;TD&gt;667&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanking you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Aug 2018 21:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/template/m-p/486192#M126457</guid>
      <dc:creator>75063</dc:creator>
      <dc:date>2018-08-12T21:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/template/m-p/486193#M126458</link>
      <description>&lt;P&gt;I have used the following code to transpose&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data=UNIVERSI.univ2016_17&lt;BR /&gt;out=lat(drop=_break_) nowd;&lt;BR /&gt;column FT TERM_DESC, roll;&lt;BR /&gt;define FT/group noprint;&lt;BR /&gt;define TERM_DESC/across noprint;&lt;BR /&gt;define roll/sum noprint;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the output is&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Obs&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;FT&lt;/TD&gt;&lt;TD&gt;_C2_&lt;/TD&gt;&lt;TD&gt;_C3_&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;FULL TIME&lt;/TD&gt;&lt;TD&gt;1566&lt;/TD&gt;&lt;TD&gt;1638&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;PART TIME&lt;/TD&gt;&lt;TD&gt;497&lt;/TD&gt;&lt;TD&gt;677&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can i rename the variable from c2, c3 to Fall2016 and Fall2017 ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 12 Aug 2018 22:06:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/template/m-p/486193#M126458</guid>
      <dc:creator>75063</dc:creator>
      <dc:date>2018-08-12T22:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/template/m-p/486274#M126502</link>
      <description>&lt;P&gt;Use a proc transpose before the proc report and get your data looking the way you want it to look before reporting.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 08:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/template/m-p/486274#M126502</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-08-13T08:01:53Z</dc:date>
    </item>
  </channel>
</rss>

