<?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 print ID + BY without getting multiple tables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-print-ID-BY-without-getting-multiple-tables/m-p/811334#M319990</link>
    <description>&lt;P&gt;One quick way is to switch to PROC REPORT and specify the BY variable as a GROUP variable instead. &lt;BR /&gt;&lt;STRIKE&gt;You can also try specifying the ID variable the same as the BY variable and see if that resolves it as in this example: &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1dex816rlsynxn1gicri1elan89.htm#n1dex816rlsynxn1gicri1elan89" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1dex816rlsynxn1gicri1elan89.htm#n1dex816rlsynxn1gicri1elan89&lt;/A&gt;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;EDIT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=class;
by sex;
run;

title 'PROC PRINT + BY';
proc print data=class;
by sex;
run;

title 'PROC PRINT + BY + ID';
proc print data=class;
id sex;
by sex;
run;

title 'PROC REPORT + GROUP';
proc report data=class;
column sex name age weight height;
define sex / group ;
define name / display;
define age / display;
define weight / display;
define height / display;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 03 May 2022 22:27:34 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2022-05-03T22:27:34Z</dc:date>
    <item>
      <title>proc print ID + BY without getting multiple tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-print-ID-BY-without-getting-multiple-tables/m-p/811333#M319989</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a single table with the same formatting as the id + by statement tables, where the id values are not repeated. For example&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lauraem93_0-1651614724881.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71128i3CD87A2D6AC973A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lauraem93_0-1651614724881.png" alt="lauraem93_0-1651614724881.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want this to all be one table, not 2.&lt;/P&gt;&lt;P&gt;How do I do this?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 21:52:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-print-ID-BY-without-getting-multiple-tables/m-p/811333#M319989</guid>
      <dc:creator>lauraem93</dc:creator>
      <dc:date>2022-05-03T21:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: proc print ID + BY without getting multiple tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-print-ID-BY-without-getting-multiple-tables/m-p/811334#M319990</link>
      <description>&lt;P&gt;One quick way is to switch to PROC REPORT and specify the BY variable as a GROUP variable instead. &lt;BR /&gt;&lt;STRIKE&gt;You can also try specifying the ID variable the same as the BY variable and see if that resolves it as in this example: &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1dex816rlsynxn1gicri1elan89.htm#n1dex816rlsynxn1gicri1elan89" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n1dex816rlsynxn1gicri1elan89.htm#n1dex816rlsynxn1gicri1elan89&lt;/A&gt;&lt;/STRIKE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;EDIT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=class;
by sex;
run;

title 'PROC PRINT + BY';
proc print data=class;
by sex;
run;

title 'PROC PRINT + BY + ID';
proc print data=class;
id sex;
by sex;
run;

title 'PROC REPORT + GROUP';
proc report data=class;
column sex name age weight height;
define sex / group ;
define name / display;
define age / display;
define weight / display;
define height / display;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 May 2022 22:27:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-print-ID-BY-without-getting-multiple-tables/m-p/811334#M319990</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-05-03T22:27:34Z</dc:date>
    </item>
  </channel>
</rss>

