<?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: A proc report question in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66790#M1591</link>
    <description>and the o/p will be some thing like&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
                                                   newpid&lt;BR /&gt;
                                                   USA,&lt;BR /&gt;
                                                    002608001&lt;BR /&gt;
                                                   USA,&lt;BR /&gt;
                                                    002608002&lt;BR /&gt;
                                                   USA,&lt;BR /&gt;
                                                    003208015&lt;BR /&gt;
                                                   USA,&lt;BR /&gt;
                                                    003308022</description>
    <pubDate>Fri, 26 Dec 2008 22:27:34 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2008-12-26T22:27:34Z</dc:date>
    <item>
      <title>A proc report question</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66785#M1586</link>
      <description>I'm a new programmer using proc report for listing and i have two questions:&lt;BR /&gt;
&lt;BR /&gt;
1, I need to know how to concatenate variables with a line skip;&lt;BR /&gt;
for example: var1:city; var2: country&lt;BR /&gt;
I concatenate var1||","||var2.&lt;BR /&gt;
&lt;BR /&gt;
   i want the output show like "&lt;BR /&gt;
   san diego,&lt;BR /&gt;
   usa&lt;BR /&gt;
"&lt;BR /&gt;
&lt;BR /&gt;
   instead of "san diego, usa "&lt;BR /&gt;
&lt;BR /&gt;
2, when grouping, i want the value of group variable show on the first line of the next page.&lt;BR /&gt;
&lt;BR /&gt;
for example:&lt;BR /&gt;
orignian:&lt;BR /&gt;
        001   xxx&lt;BR /&gt;
        ....      xxx&lt;BR /&gt;
 (page break)&lt;BR /&gt;
        ....      xxx&lt;BR /&gt;
i want:&lt;BR /&gt;
        001 xxx&lt;BR /&gt;
        .....     xxx&lt;BR /&gt;
 (page break)&lt;BR /&gt;
        001 xxx&lt;BR /&gt;
&lt;BR /&gt;
I think it's common requirements i just can't figure out myself. thanks!</description>
      <pubDate>Fri, 19 Dec 2008 20:15:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66785#M1586</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-19T20:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: A proc report question</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66786#M1587</link>
      <description>share what code you have - it will help.</description>
      <pubDate>Fri, 19 Dec 2008 22:12:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66786#M1587</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-12-19T22:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: A proc report question</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66787#M1588</link>
      <description>Hi:&lt;BR /&gt;
  #1)  In ODS RTF, PDF and HTML, you can insert a "line feed" or what you call a line skip into a character string, by using ODS ESCAPECHAR, as shown in the program below:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods escapechar='^';&lt;BR /&gt;
                       &lt;BR /&gt;
data class;&lt;BR /&gt;
  length newvar $50;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  newvar = 'Name: '||name||'^n Age: '||put(age,2.0)||&lt;BR /&gt;
           '^n Gender: '||sex;&lt;BR /&gt;
run;&lt;BR /&gt;
                     &lt;BR /&gt;
ods listing;&lt;BR /&gt;
ods html file='class_linebr.html' style=sasweb;&lt;BR /&gt;
ods rtf file='class_linebr.rtf' ;&lt;BR /&gt;
ods pdf file='class_linebr.pdf';&lt;BR /&gt;
                          &lt;BR /&gt;
  proc print data=class;&lt;BR /&gt;
    title 'Put a line break';&lt;BR /&gt;
    var newvar name age height sex;&lt;BR /&gt;
  run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                                                                                        &lt;BR /&gt;
If the ESCAPE character is set to '^' (as it is above), then ESCAPECHAR + n represents a line feed. However, this line feed character is NOT recognized as a line feed by the LISTING window. So in the LISTING window, you will still see the ^n (which you do not see in the HTML, RTF or PDF files.)&lt;BR /&gt;
&lt;BR /&gt;
  #2) When you use ODS RTF, PDF in SAS 9.1.3, it is very hard to get the repeat of a group variable at the top of the page when the output breaks across pages, as described in this Tech Support note:&lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/7/887.html" target="_blank"&gt;http://support.sas.com/kb/7/887.html&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
 A lot of pharmaceutical companies get around this issue by writing their reports to use BY group processing so each group starts on a separate page, or, soemtimes, they write their own RTF strings instead of using ODS, or, sometimes by post-processing the RTF file, or, sometimes, by figuring out how many observations will fit on a page and then creating a "page counter" variable to use with PROC REPORT (which is the workaround described in the Tech Support Note).&lt;BR /&gt;
&lt;BR /&gt;
  This behavior is not a problem in SAS 9.2, when you use TAGSETS.RTF, but unless you are on SAS 9.2, you have to deal with this issue or work around it somehow..&lt;BR /&gt;
&lt;BR /&gt;
Here are some other PROC REPORT tutorials that you might find helpful:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2008/031-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/031-2008.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2008/188-2008.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2008/188-2008.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
It is also possible that your coworkers have already dealt with this issue in their standard set of report programs that they use for clinical trials. Since most report programs must be tested and validated for a clinical trial, the chances are very good that you will find your company already has a preferred workaround for this issue.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 19 Dec 2008 23:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66787#M1588</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2008-12-19T23:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: A proc report question</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66788#M1589</link>
      <description>Thank you for the very helpful answers cynthia!&lt;BR /&gt;
Mark</description>
      <pubDate>Sun, 21 Dec 2008 23:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66788#M1589</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-21T23:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: A proc report question</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66789#M1590</link>
      <description>try this....&lt;BR /&gt;
&lt;BR /&gt;
while concatenating also insert '~', and in proc report use split='~' and flow oprion in the define statement....for example&lt;BR /&gt;
&lt;BR /&gt;
  proc report data= aa nowd split = '~' ;&lt;BR /&gt;
  column newpid;&lt;BR /&gt;
  define newpid / width = 30 flow;&lt;BR /&gt;
  run;</description>
      <pubDate>Fri, 26 Dec 2008 22:22:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66789#M1590</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-26T22:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: A proc report question</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66790#M1591</link>
      <description>and the o/p will be some thing like&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
                                                   newpid&lt;BR /&gt;
                                                   USA,&lt;BR /&gt;
                                                    002608001&lt;BR /&gt;
                                                   USA,&lt;BR /&gt;
                                                    002608002&lt;BR /&gt;
                                                   USA,&lt;BR /&gt;
                                                    003208015&lt;BR /&gt;
                                                   USA,&lt;BR /&gt;
                                                    003308022</description>
      <pubDate>Fri, 26 Dec 2008 22:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/A-proc-report-question/m-p/66790#M1591</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-12-26T22:27:34Z</dc:date>
    </item>
  </channel>
</rss>

