<?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 report out= but headings not _C1_ etc in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-report-out-but-headings-not-C1-etc/m-p/538986#M148427</link>
    <description>&lt;P&gt;I would tend to avoid using across.&amp;nbsp; Simply transpose your data before the proc report, that way you then have a nice dataset which you can QC.&amp;nbsp; The _c1_ is automatic variable labelling, depending on how you have your data - which you have not shown - a transpose will allow you to label and specify name of variables, e.g;&lt;/P&gt;
&lt;PRE&gt;data have;
  id=1; lab="abc"; nam="VAR1"; val=1; output;
  id=1; lab="def rft"; nam="VAR2"; val=5; output;
run;

proc transpose data=have;
  by id;
  var val;
  id nam;
  idlabel lab;
run;&lt;/PRE&gt;
&lt;P&gt;So nam variable will be name of variable, lab will contain the label for it.&amp;nbsp; You can then report the above quite simply with:&lt;/P&gt;
&lt;PRE&gt;columns _all_;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Feb 2019 14:41:55 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2019-02-27T14:41:55Z</dc:date>
    <item>
      <title>proc report out= but headings not _C1_ etc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-out-but-headings-not-C1-etc/m-p/538968#M148419</link>
      <description>&lt;P&gt;Should be a simple one for someone but been stuck on this for a while now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using a proc report with an out function. All works fine except that with the output the columns are headed _C1_, _C2_...etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just want them to stay as the headings in the proc report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Labelling individually is not an option as they are months and will be showing the most recent 12 months and so changing every time. code used below, pretty simple stuff. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;report&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; = data (&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=(&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;month &amp;gt; &amp;amp;year_Month&lt;/P&gt;&lt;P&gt;and month &amp;lt;= &amp;amp;current_Month&lt;FONT face="Courier New" size="3"&gt;)) &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=test1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;columns&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sector month, exposure;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;define&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; sector/&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;group&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;define&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; month/&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;across&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;define&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; exposure/&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;analysis&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;sum&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;comma14.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 14:00:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-out-but-headings-not-C1-etc/m-p/538968#M148419</guid>
      <dc:creator>CharlesFowler72</dc:creator>
      <dc:date>2019-02-27T14:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc report out= but headings not _C1_ etc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-out-but-headings-not-C1-etc/m-p/538986#M148427</link>
      <description>&lt;P&gt;I would tend to avoid using across.&amp;nbsp; Simply transpose your data before the proc report, that way you then have a nice dataset which you can QC.&amp;nbsp; The _c1_ is automatic variable labelling, depending on how you have your data - which you have not shown - a transpose will allow you to label and specify name of variables, e.g;&lt;/P&gt;
&lt;PRE&gt;data have;
  id=1; lab="abc"; nam="VAR1"; val=1; output;
  id=1; lab="def rft"; nam="VAR2"; val=5; output;
run;

proc transpose data=have;
  by id;
  var val;
  id nam;
  idlabel lab;
run;&lt;/PRE&gt;
&lt;P&gt;So nam variable will be name of variable, lab will contain the label for it.&amp;nbsp; You can then report the above quite simply with:&lt;/P&gt;
&lt;PRE&gt;columns _all_;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Feb 2019 14:41:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-out-but-headings-not-C1-etc/m-p/538986#M148427</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-02-27T14:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc report out= but headings not _C1_ etc</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-report-out-but-headings-not-C1-etc/m-p/539015#M148438</link>
      <description>&lt;P&gt;Sums by month and sector are easily handled by PROC SUMMARY, giving you complete control over the naming of the variables. If it must be in some tabular form, then PROC TRANSPOSE will get you there.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 15:12:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-report-out-but-headings-not-C1-etc/m-p/539015#M148438</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-02-27T15:12:29Z</dc:date>
    </item>
  </channel>
</rss>

