<?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: Column Headers, PROC REPORT -- special characters? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53889#M14915</link>
    <description>Hi.you can use ' line ' statement with noheader option to get that.&lt;BR /&gt;
But I also find another solution ,You can add a variable before this variable to hold prefix &lt;BR /&gt;
and add another variable after this variable to hold postfix .&lt;BR /&gt;
but this solution is only suited for the length of label greater than the length of variable .&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc report data=sashelp.class nowd;&lt;BR /&gt;
 column prefix name postfix sex;&lt;BR /&gt;
 define prefix /computed format=$1. '_';&lt;BR /&gt;
 define name /display 'Student Name' spacing=0 width=12;&lt;BR /&gt;
 define postfix /computed format=$1. '_' spacing=0;&lt;BR /&gt;
 define sex/'Sex';&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
    <pubDate>Fri, 22 Apr 2011 00:27:23 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2011-04-22T00:27:23Z</dc:date>
    <item>
      <title>Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53880#M14906</link>
      <description>Greetings.&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to use column headers like "++", "+++", "++++" in a shift table that I'm generating with proc report.  When I specify this in the DEFINE statement, I get a row of plus signs across the entire column rather than the number of plus signs I specified between the quotes.  &lt;BR /&gt;
&lt;BR /&gt;
When I substitute just about any other character for the plus signs:&lt;BR /&gt;
&lt;BR /&gt;
               define cell4p  /                    width = 12  "    aaa~___";&lt;BR /&gt;
               define cell5p  /                    width = 12  "    +++~___";&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I get exactly what is between the quotes.&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
                                                                                     WEEK 26          &lt;BR /&gt;
                                                                      ---------------------------------------------&lt;BR /&gt;
                                         (BASELINE                  aaa             ++++++++++&lt;BR /&gt;
                                         WEEK -4)               ____________   ____________&lt;BR /&gt;
                                                                                           &lt;BR /&gt;
                                         NEGATIVE                 8 (  1.7)           12 (  2.5) &lt;BR /&gt;
                                         TRACE                      1 (  3.3)            0         &lt;BR /&gt;
                                         1+                             3 ( 20.0)           0         &lt;BR /&gt;
                                         2+                             0                     1 ( 14.3) &lt;BR /&gt;
                                         3+                              0                     0         &lt;BR /&gt;
                                         4+                              0                     0         &lt;BR /&gt;
                                         TOTAL                     12 (  2.3)           13 (  2.5) &lt;BR /&gt;
&lt;BR /&gt;
So how do I tell PROC REPORT that there's nothing magical about the plus signs and that I want exactly that number of them and no more?&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
&lt;BR /&gt;
...dave</description>
      <pubDate>Wed, 20 Apr 2011 16:46:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53880#M14906</guid>
      <dc:creator>daveconifer</dc:creator>
      <dc:date>2011-04-20T16:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53881#M14907</link>
      <description>This is the expected behavior. See &lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473625.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473625.htm&lt;/A&gt;.&lt;BR /&gt;
[pre]&lt;BR /&gt;
In traditional (monospace) SAS output, if the first and last characters of a heading &lt;BR /&gt;
are one of the following characters, then PROC REPORT uses that character to &lt;BR /&gt;
expand the heading to fill the space over the column or columns. Note that the &amp;lt;&amp;gt; &lt;BR /&gt;
and the &amp;gt;&amp;lt; must be paired.&lt;BR /&gt;
&lt;BR /&gt;
- =  . _ * + &amp;lt;&amp;gt; &amp;gt;&amp;lt;&lt;BR /&gt;
&lt;BR /&gt;
Similarly, if the first character of a heading is &amp;lt; and the last character is &amp;gt;, or &lt;BR /&gt;
vice versa, then PROC REPORT expands the heading to fill the space over the column &lt;BR /&gt;
by repeating the first character before the text of the heading and the last character &lt;BR /&gt;
after it.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
This behavior only occurs for listing output, so you can avoid it by writing the report to a non-listing destination such as PDF or HTML. If you must use listing output, you can defeat it by putting a blank before and a blank after the header, so instead of "++HEADER++" use " ++HEADER++ ".&lt;BR /&gt;
&lt;BR /&gt;
To be completely accurate, when you're writing to a non-listing destination PROC REPORT &lt;I&gt;removes&lt;/I&gt; the repeating characters from the header. To retain the plus signs, add an extra blank before and after the header as above.&lt;I&gt;&lt;/I&gt;&lt;I&gt;&lt;/I&gt;&lt;B&gt;&lt;/B&gt;

Message was edited by: Tim@SAS</description>
      <pubDate>Wed, 20 Apr 2011 17:48:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53881#M14907</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2011-04-20T17:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53882#M14908</link>
      <description>Hi Tim,&lt;BR /&gt;
&lt;BR /&gt;
Thanks for replying.  &lt;BR /&gt;
&lt;BR /&gt;
I altered my DEFINE statement to:&lt;BR /&gt;
&lt;BR /&gt;
define cell5p  /                    width = 12  " +++ ";&lt;BR /&gt;
&lt;BR /&gt;
(with a leading a trailing space) and I'm still getting the plus signs all the way across the column.  Unfortunately I can't output to any other format except the regular listing because this output feeds into an existing document management system.&lt;BR /&gt;
&lt;BR /&gt;
I was hoping that there was some kind of FORMCHAR statement by which I could remove the "+" from any special treatment, but of course if there was such a solution you'd have mentioned it.&lt;BR /&gt;
&lt;BR /&gt;
I guess I'm out of luck.  Maybe they'll have to go with the plan B I suggested -- altering the heading text!&lt;BR /&gt;
&lt;BR /&gt;
edit:  I've read that over and over now that you pointed it out.  It should work, dadgummit...&lt;BR /&gt;
&lt;BR /&gt;
...dave

Message was edited by: daveconifer</description>
      <pubDate>Wed, 20 Apr 2011 18:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53882#M14908</guid>
      <dc:creator>daveconifer</dc:creator>
      <dc:date>2011-04-20T18:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53883#M14909</link>
      <description>It works if I insert a "z" (or any character, I'd presume) as the first and last character.  Just not a blank...</description>
      <pubDate>Wed, 20 Apr 2011 18:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53883#M14909</guid>
      <dc:creator>daveconifer</dc:creator>
      <dc:date>2011-04-20T18:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53884#M14910</link>
      <description>Ah, you're right. For listing output, PROC REPORT removes leading and trailing blanks &lt;I&gt;before&lt;/I&gt; it looks for expanding characters. &lt;BR /&gt;
&lt;BR /&gt;
I should've double-checked before I posted. I'm sorry.</description>
      <pubDate>Wed, 20 Apr 2011 20:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53884#M14910</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2011-04-20T20:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53885#M14911</link>
      <description>Thanks Tim.&lt;BR /&gt;
&lt;BR /&gt;
My bosses insist that I use PROC REPORT and now I've checked with a real SAS guy.  They have no choice but to change the column headers now.  I'm off the hook!&lt;BR /&gt;
&lt;BR /&gt;
...dave</description>
      <pubDate>Wed, 20 Apr 2011 20:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53885#M14911</guid>
      <dc:creator>daveconifer</dc:creator>
      <dc:date>2011-04-20T20:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53886#M14912</link>
      <description>If a blank to start/end the string may not work try a null charcter. In Windows at least, hold down the Alt key and press 255 on the numeric key pad. It looks like a blank when printed but doesn't normally get stripped in other places, so may not in this case as well.</description>
      <pubDate>Wed, 20 Apr 2011 20:46:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53886#M14912</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-04-20T20:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53887#M14913</link>
      <description>Thanks, BallardW.  I guess that doesn't fly on a UNIX.  I tried it though, and I thank you for the idea...</description>
      <pubDate>Thu, 21 Apr 2011 02:18:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53887#M14913</guid>
      <dc:creator>daveconifer</dc:creator>
      <dc:date>2011-04-21T02:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53888#M14914</link>
      <description>Hey Everybody,&lt;BR /&gt;
&lt;BR /&gt;
Just an update.  I was able to achieve my objective using proc report.  Instead of embedding the plus signs in column labels I inserted a "compute before _page_" block and printed the column headers exactly as I wanted them.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for all your help!&lt;BR /&gt;
&lt;BR /&gt;
...dave</description>
      <pubDate>Thu, 21 Apr 2011 15:18:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53888#M14914</guid>
      <dc:creator>daveconifer</dc:creator>
      <dc:date>2011-04-21T15:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Column Headers, PROC REPORT -- special characters?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53889#M14915</link>
      <description>Hi.you can use ' line ' statement with noheader option to get that.&lt;BR /&gt;
But I also find another solution ,You can add a variable before this variable to hold prefix &lt;BR /&gt;
and add another variable after this variable to hold postfix .&lt;BR /&gt;
but this solution is only suited for the length of label greater than the length of variable .&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc report data=sashelp.class nowd;&lt;BR /&gt;
 column prefix name postfix sex;&lt;BR /&gt;
 define prefix /computed format=$1. '_';&lt;BR /&gt;
 define name /display 'Student Name' spacing=0 width=12;&lt;BR /&gt;
 define postfix /computed format=$1. '_' spacing=0;&lt;BR /&gt;
 define sex/'Sex';&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 22 Apr 2011 00:27:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Column-Headers-PROC-REPORT-special-characters/m-p/53889#M14915</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-04-22T00:27:23Z</dc:date>
    </item>
  </channel>
</rss>

