<?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 Proc repot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-repot/m-p/43897#M8999</link>
    <description>provider  drugname  totalsales&lt;BR /&gt;
ABC        mydrug     250&lt;BR /&gt;
ABC        comp1      100 &lt;BR /&gt;
ABC        mydrug     250&lt;BR /&gt;
ABC        comp2      100 &lt;BR /&gt;
ABC        comp3      100 &lt;BR /&gt;
PQR        mydrug     250&lt;BR /&gt;
PQR       comp1      100 &lt;BR /&gt;
pqr        mydrug       250&lt;BR /&gt;
pqr        comp2        100 &lt;BR /&gt;
pqr        comp3        100 &lt;BR /&gt;
&lt;BR /&gt;
For the above data I need to generate output this way.&lt;BR /&gt;
Note:The numbers are arbitrary.This is only to show how the data looks and how the output must look.In real data, I have around 20 providers and 7 different drugs.&lt;BR /&gt;
The percentage shows the percentage of the drug sales.&lt;BR /&gt;
I tried this creating 20 different datasets for each drug and its sum and percentage.This is tedious in a way.&lt;BR /&gt;
Any help is appreciated.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Provider  totalpres  mydrug  comp1 comp2 mydrug comp3 &lt;BR /&gt;
ABC         1000       250        30%   20%     25%      25%&lt;BR /&gt;
PQR         500        250        15%   20%    50%  25%</description>
    <pubDate>Fri, 12 Jun 2009 15:20:50 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2009-06-12T15:20:50Z</dc:date>
    <item>
      <title>Proc repot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-repot/m-p/43897#M8999</link>
      <description>provider  drugname  totalsales&lt;BR /&gt;
ABC        mydrug     250&lt;BR /&gt;
ABC        comp1      100 &lt;BR /&gt;
ABC        mydrug     250&lt;BR /&gt;
ABC        comp2      100 &lt;BR /&gt;
ABC        comp3      100 &lt;BR /&gt;
PQR        mydrug     250&lt;BR /&gt;
PQR       comp1      100 &lt;BR /&gt;
pqr        mydrug       250&lt;BR /&gt;
pqr        comp2        100 &lt;BR /&gt;
pqr        comp3        100 &lt;BR /&gt;
&lt;BR /&gt;
For the above data I need to generate output this way.&lt;BR /&gt;
Note:The numbers are arbitrary.This is only to show how the data looks and how the output must look.In real data, I have around 20 providers and 7 different drugs.&lt;BR /&gt;
The percentage shows the percentage of the drug sales.&lt;BR /&gt;
I tried this creating 20 different datasets for each drug and its sum and percentage.This is tedious in a way.&lt;BR /&gt;
Any help is appreciated.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Provider  totalpres  mydrug  comp1 comp2 mydrug comp3 &lt;BR /&gt;
ABC         1000       250        30%   20%     25%      25%&lt;BR /&gt;
PQR         500        250        15%   20%    50%  25%</description>
      <pubDate>Fri, 12 Jun 2009 15:20:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-repot/m-p/43897#M8999</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2009-06-12T15:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Proc repot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-repot/m-p/43898#M9000</link>
      <description>Suggest a DATA step to prepare your data (hint: UPCASE on provider), then PROC TRANSPOSE (vertical data to horizontal) using BY.  Then PROC PRINT or PROC REPORT.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 12 Jun 2009 15:39:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-repot/m-p/43898#M9000</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-06-12T15:39:54Z</dc:date>
    </item>
  </channel>
</rss>

