<?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 column statement in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/373014#M18910</link>
    <description>Hi:&lt;BR /&gt;  The COLUMN statement needs variable names and the name "frq_-1" is invalid for a variable name. The rules for naming variables are that the name has to start with a letter or an underscore and continue with any combination of letters, numbers and underscores. A SAS variable name cannot have special characters (such as dash - or space or #, etc). So what you show should have received an error message back when you created it or first read this data into SAS.&lt;BR /&gt;&lt;BR /&gt;You can, if you choose, use name tokens as variable names. Name tokens allow special characters and I generally argue against using them unless you are reading database data and the database allows special characters. But even then, I will recommend renaming the variables to conform, to make your life easier. A name token looks like this in code:&lt;BR /&gt;&lt;BR /&gt;'Job Title'n&lt;BR /&gt;'frq_-1'n&lt;BR /&gt;'year #2'n&lt;BR /&gt;&lt;BR /&gt;Note the use of quotes and the n indicator -- that is how you reference a name token or name literal  (basically, a non-conforming name) in code. But I am not sure that it is warranted in this case. &lt;BR /&gt;&lt;BR /&gt;I recommend going back before your PROC REPORT step, where you first try to create this variable and make sure that you really are creating the variable correctly and try using a conforming name for the variable and then use frq_-1 as the label.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
    <pubDate>Tue, 04 Jul 2017 14:18:35 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2017-07-04T14:18:35Z</dc:date>
    <item>
      <title>proc report column statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372897#M18898</link>
      <description>&lt;P&gt;I would like to use column header as frq_-1 but it gives error for'-' ,Is there any way to use it on column statement in proc report.&lt;/P&gt;&lt;P&gt;Thanks you.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 01:36:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372897#M18898</guid>
      <dc:creator>paddyb</dc:creator>
      <dc:date>2017-07-04T01:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372899#M18899</link>
      <description>&lt;P&gt;Hi Paddy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To clarify: your variable is called frq_-1??&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to use it in a column statement by specifying&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'frq_-1'n&amp;nbsp; as the reference to that variable in the column statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that's not what you were asking, let me know.&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 01:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372899#M18899</guid>
      <dc:creator>ABritinAus</dc:creator>
      <dc:date>2017-07-04T01:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372903#M18900</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; In addition, no matter what your variables are named, you can always tell PROC REPORT to use some other string as the column header for the report:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;proc report data=sashelp.class;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; column name age height weight;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; define name / display 'frq_-1';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp; define age / display 'xyz_-2';&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 01:54:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372903#M18900</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-07-04T01:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372904#M18901</link>
      <description>&lt;P&gt;I think if it is a column header (column label) then you should not get any error. Could you please show us how you are applying this in a code&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 01:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372904#M18901</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-07-04T01:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372910#M18902</link>
      <description>yes i was using it for column header&lt;BR /&gt;column frq_-1 freq_1 freq_2;</description>
      <pubDate>Tue, 04 Jul 2017 03:14:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372910#M18902</guid>
      <dc:creator>paddyb</dc:creator>
      <dc:date>2017-07-04T03:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372911#M18903</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2017 03:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/372911#M18903</guid>
      <dc:creator>paddyb</dc:creator>
      <dc:date>2017-07-04T03:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: proc report column statement</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/373014#M18910</link>
      <description>Hi:&lt;BR /&gt;  The COLUMN statement needs variable names and the name "frq_-1" is invalid for a variable name. The rules for naming variables are that the name has to start with a letter or an underscore and continue with any combination of letters, numbers and underscores. A SAS variable name cannot have special characters (such as dash - or space or #, etc). So what you show should have received an error message back when you created it or first read this data into SAS.&lt;BR /&gt;&lt;BR /&gt;You can, if you choose, use name tokens as variable names. Name tokens allow special characters and I generally argue against using them unless you are reading database data and the database allows special characters. But even then, I will recommend renaming the variables to conform, to make your life easier. A name token looks like this in code:&lt;BR /&gt;&lt;BR /&gt;'Job Title'n&lt;BR /&gt;'frq_-1'n&lt;BR /&gt;'year #2'n&lt;BR /&gt;&lt;BR /&gt;Note the use of quotes and the n indicator -- that is how you reference a name token or name literal  (basically, a non-conforming name) in code. But I am not sure that it is warranted in this case. &lt;BR /&gt;&lt;BR /&gt;I recommend going back before your PROC REPORT step, where you first try to create this variable and make sure that you really are creating the variable correctly and try using a conforming name for the variable and then use frq_-1 as the label.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Tue, 04 Jul 2017 14:18:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/proc-report-column-statement/m-p/373014#M18910</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-07-04T14:18:35Z</dc:date>
    </item>
  </channel>
</rss>

