<?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 summary or proc tabulate question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260561#M50579</link>
    <description>&lt;P&gt;This appears to be a job for PROC PRINT, and not a summary procedure.&amp;nbsp; Are there any cases where you don't want to print every observation?&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2016 21:27:53 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2016-03-31T21:27:53Z</dc:date>
    <item>
      <title>Proc summary or proc tabulate question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260515#M50561</link>
      <description>&lt;P&gt;Hi SAS Forum,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; have;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Acct_num date Ltr_ID $ &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;14&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Sce_ID Stgy_ID;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;cards&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;111 201412 TLL 102 603&lt;/P&gt;&lt;P&gt;111 201508 TLL 101 603&lt;/P&gt;&lt;P&gt;222 201404 JJJ 83 245&lt;/P&gt;&lt;P&gt;222 201508 JJJ 83 300&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Question:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Using the above data set (over 50k records), I wanted to create the below table. Below table simply&amp;nbsp;presents what are the Dates, Sce_IDs and Stgy_IDs associated with each Ltr_ID.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Ltr_ID&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Sce_ID&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Stgy_ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;TLL&lt;/TD&gt;&lt;TD&gt;201412&lt;/TD&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;603&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;201508&lt;/TD&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;JJJ&lt;/TD&gt;&lt;TD&gt;201404&lt;/TD&gt;&lt;TD&gt;83&lt;/TD&gt;&lt;TD&gt;245&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;201508&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Could you please help me. I have used cross tabs and proc frequencies etc but found difficult. I am using sas ver 9.3.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Thanks&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;Mirisa&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 19:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260515#M50561</guid>
      <dc:creator>dunga</dc:creator>
      <dc:date>2016-03-31T19:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc summary or proc tabulate question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260561#M50579</link>
      <description>&lt;P&gt;This appears to be a job for PROC PRINT, and not a summary procedure.&amp;nbsp; Are there any cases where you don't want to print every observation?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 21:27:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260561#M50579</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-03-31T21:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc summary or proc tabulate question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260593#M50594</link>
      <description>&lt;PRE&gt;
data have;
input Acct_num date Ltr_ID $ 12-14 Sce_ID Stgy_ID;
cards;
111 201412 TLL 102 603
111 201508 TLL 101 603
222 201404 JJJ 83 245
222 201508 JJJ 83 300
;
run;
 
 data want;
  set have;
 if Acct_num = lag(Acct_num) then call missing(Acct_num );
  if Ltr_ID = lag(Ltr_ID ) then call missing(Ltr_ID );
 if Sce_ID = lag(Sce_ID ) then call missing(Sce_ID );
 if Stgy_ID= lag(Stgy_ID) then call missing(Stgy_ID);
run;




&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Apr 2016 01:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260593#M50594</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-04-01T01:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc summary or proc tabulate question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260599#M50598</link>
      <description>&lt;P&gt;This?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort nodupkey;

 by Ltr_ID Date Sce_ID  Stgy_ID ;

run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Apr 2016 03:24:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260599#M50598</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-04-01T03:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc summary or proc tabulate question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260744#M50638</link>
      <description>&lt;P&gt;Thanks to everybody.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Xia's approach worked well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Xia,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mirisa&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2016 14:53:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-summary-or-proc-tabulate-question/m-p/260744#M50638</guid>
      <dc:creator>dunga</dc:creator>
      <dc:date>2016-04-01T14:53:33Z</dc:date>
    </item>
  </channel>
</rss>

