<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574393#M162289</link>
    <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data CLASS;
  length NAME $16;
  set SASHELP.CLASS(where=(SEX='M' &amp;amp; AGE=14))
      SASHELP.CLASS(where=(SEX='F' &amp;amp; AGE=14));
run;
proc report data= CLASS;
  column SEX WEIGHT=WMAX NAME ;
  define SEX  / order order=data;
  define NAME / order  ;
  define WMAX / analysis max noprint;
  compute NAME;
    NAME=catt(NAME,' (',put(WMAX,8.2 -l),')');
  endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;&lt;BR /&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;Sex&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;NAME&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;M&lt;/TD&gt;
&lt;TD class="l data"&gt;Alfred (112.50)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Henry (102.50)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;F&lt;/TD&gt;
&lt;TD class="l data"&gt;Carol (102.50)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Judy (90.00)&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2019 22:45:31 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2019-07-17T22:45:31Z</dc:date>
    <item>
      <title>Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574371#M162278</link>
      <description>&lt;P&gt;Hello programmers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use proc report to replicated the format of the data in the picture.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to combine 'Baseline Mean" and "Baseline Std" in the same column like in the form that i want it to? Same thing with "Month mean" and "Month std"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data set and code is attached. Any form of help is needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 491px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31099i1CDA949A14E9E424/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.JPG" style="width: 499px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31102iEAED33C525D8CF3C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.JPG" alt="2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data AAA;&lt;BR /&gt;input grporder grpname $ Tc Tn $ Mean_baseline Mean_12_months std_baseline std_12_months prob_change run;&lt;BR /&gt;datalines;&lt;BR /&gt;1 Motor 2 UHDRS 32.8571 29.7143 6.2029 7.5435 0.29688 1&lt;BR /&gt;1 Motor 3 CHOREA 11.8571 10.1429 3.7607 1.8645 0.15625 1&lt;BR /&gt;1 Motor 4 GAIT 1.2857 1.2857 0.488 0.7559 1 1&lt;BR /&gt;1 Motor 5 TANDEM 1.8571 1.5714 1.069 1.3973 0.75 1&lt;BR /&gt;1 Motor 6 PULL 0.1429 0.7143 0.378 0.7559 0.125 1&lt;BR /&gt;1 Motor 7 BALANCE 3.2857 3.5714 1.3801 2.6367 1 1&lt;BR /&gt;2 Physical 1 TFC 6.5714 7 0.9759 2.1602 0.625 1&lt;BR /&gt;2 Physical 13 FA 20.2857 19.1429 2.2147 3.2367 0.3125 1&lt;BR /&gt;2 Physical 14 IS 77.1429 71.4286 8.5912 7.4801 0.28125 1&lt;BR /&gt;3 Cognigt 8 COWA 27.1667 31.5 8.2321 13.896 0.1875 1&lt;BR /&gt;3 Cognigt 9 SYMBAL 25.1429 20.1429 5.113 7.1514 0.09375 1&lt;BR /&gt;3 Cognigt 10 STRP1 45.8571 38.2857 13.5576 17.1437 0.04688 1&lt;BR /&gt;3 Cognigt 11 STRP2 61.7143 52.2857 19.414 22.5367 0.03125 1&lt;BR /&gt;3 Cognigt 12 STRP3 29.4286 28.1429 9.6065 10.4152 0.40625 1&lt;BR /&gt;3 Cognigt 15 MMSE 27.5 26.8333 2.51 2.6394 0.625 1&lt;BR /&gt;; run;

proc report data= AAA split = '^' ;&lt;BR /&gt;title1 "Appendix 1: Baseline Data";&lt;BR /&gt;column grpname tn Mean_baseline Std_baseline Mean_12_months std_12_months prob_change; &lt;BR /&gt;define grpname/group width=10 order=data;&lt;BR /&gt;define tn/group width=10 order=data;&lt;BR /&gt;define Mean_baseline / display format=5.1'Baseline ^Mean' ;&lt;BR /&gt;define Std_baseline/ display format= 5.1 'Baseline ^ Std';&lt;BR /&gt;define Mean_12_months / display format=5.1 'Month 12^Mean';&lt;BR /&gt;define std_12_months/display format=5.1 'Month 12 ^ Std';&lt;BR /&gt;define prob_change/ display format=5.3 'Change^P-value';&lt;BR /&gt;run; 


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 21:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574371#M162278</guid>
      <dc:creator>ChuksManuel</dc:creator>
      <dc:date>2019-07-17T21:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574381#M162281</link>
      <description>&lt;P&gt;I do not think PROC REPORT can produce a format (even with custom format or pictures) like 33.9(6.2).&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Why don't you use the DATA step method I provided for one of your earlier threads?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Formating-output-after-proc-univariate/m-p/574273#M162237" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/Formating-output-after-proc-univariate/m-p/574273#M162237&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 22:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574381#M162281</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-17T22:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574382#M162282</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I asked the same question about using formats and the response i got was vague. Hence why i opted for proc report as someone suggested earlier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please if i can't get output exactly in proc report, how do i:&lt;/P&gt;&lt;P&gt;1. Make the groupnames "Motor" "Physical" and "cognit" appear above their respective testnames.&lt;/P&gt;&lt;P&gt;2. How do i create a space to demarcate one groupname from another like in the excel pic.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 22:13:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574382#M162282</guid>
      <dc:creator>ChuksManuel</dc:creator>
      <dc:date>2019-07-17T22:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574387#M162286</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/236266"&gt;@ChuksManuel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;I asked the same question about using formats and the response i got was vague. Hence why i opted for proc report as someone suggested earlier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please if i can't get output exactly in proc report, how do i:&lt;/P&gt;
&lt;P&gt;1. Make the groupnames "Motor" "Physical" and "cognit" appear above their respective testnames.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's the exact same concept that enabled us to put BMI in a different format as the &lt;EM&gt;last&lt;/EM&gt; line of the previous example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;2. How do i create a space to demarcate one groupname from another like in the excel pic.&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I put spaces in the DATA step example, it's the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 22:21:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574387#M162286</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-07-17T22:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574393#M162289</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data CLASS;
  length NAME $16;
  set SASHELP.CLASS(where=(SEX='M' &amp;amp; AGE=14))
      SASHELP.CLASS(where=(SEX='F' &amp;amp; AGE=14));
run;
proc report data= CLASS;
  column SEX WEIGHT=WMAX NAME ;
  define SEX  / order order=data;
  define NAME / order  ;
  define WMAX / analysis max noprint;
  compute NAME;
    NAME=catt(NAME,' (',put(WMAX,8.2 -l),')');
  endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;&lt;BR /&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Report: Detailed and/or summarized report" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c header" scope="col"&gt;Sex&lt;/TH&gt;
&lt;TH class="c header" scope="col"&gt;NAME&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;M&lt;/TD&gt;
&lt;TD class="l data"&gt;Alfred (112.50)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Henry (102.50)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;F&lt;/TD&gt;
&lt;TD class="l data"&gt;Carol (102.50)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="c data"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="l data"&gt;Judy (90.00)&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 22:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574393#M162289</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-07-17T22:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574401#M162296</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data= AAA split= '^';
title1 "Appendix 1: Baseline Data";
  column grpname tn Meanbaseline Mean12months prob_change ;
  define grpname/group width=10 order=data;
define tn/group width=10 order=data;
define Mean_baseline/computed  'Baseline Mean (Std)';
define Mean_12_months/computed 'Month 12 Mean (Std)';
  compute Meanbaseline;
    Meanbaseline=catt(Mean_baseline,' (',put(Std_baseline,5.1),')');
  endcomp;
compute Mean12months;
    Mean12months=catt(Mean_12_months,' (',put(Std_12_months,5.1),')');
  endcomp;

run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you Chris.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how i can fit this into my code? It gave me an error message. Saying the variables are numeric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 00:10:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574401#M162296</guid>
      <dc:creator>ChuksManuel</dc:creator>
      <dc:date>2019-07-18T00:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc report</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574817#M162486</link>
      <description>&lt;P&gt;1. Show the log&lt;/P&gt;
&lt;P&gt;2. Why do you use &lt;FONT face="courier new,courier"&gt;/computed&lt;/FONT&gt; ?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 22:46:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-report/m-p/574817#M162486</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-07-18T22:46:36Z</dc:date>
    </item>
  </channel>
</rss>

