<?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: How to make this  outcome using this data set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-this-outcome-using-this-data-set/m-p/775992#M246701</link>
    <description>&lt;P&gt;Providing the data in a friendlier form and a bit more description of the desired outcome would reduce guesswork and increase motivation to post an answer to your question.&lt;/P&gt;
&lt;P&gt;Is below what you're after?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile datalines truncover dsd dlm=',';
  input customer_id :$20. var $ (unit1-unit4) (:best32.);
  datalines;
C23005A6,3,15,,39
146DX2356,4,11,,,5
B36AA323,3,10,15,20
F123G246H1,1,
;

data want;
  set have;
  array _units {*} unit:;
  do i=1 to dim(_units);
    if not missing(_units[i]) then 
      do;
        units_purchased=_units[i];
        output;
      end;
  end;
  keep customer_id units_purchased;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 23 Oct 2021 02:30:51 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2021-10-23T02:30:51Z</dc:date>
    <item>
      <title>How to make this  outcome using this data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-this-outcome-using-this-data-set/m-p/775841#M246648</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="螢幕截圖 2021-10-22 下午5.49.52.png" style="width: 568px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64948i302414794EF48E9A/image-size/large?v=v2&amp;amp;px=999" role="button" title="螢幕截圖 2021-10-22 下午5.49.52.png" alt="螢幕截圖 2021-10-22 下午5.49.52.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;C23005A6,3,15,,39&lt;/P&gt;&lt;P&gt;146DX2356,4,11,,,5&lt;/P&gt;&lt;P&gt;B36AA323,3,10,15,20&lt;/P&gt;&lt;P&gt;F123G246H1,1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 09:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-this-outcome-using-this-data-set/m-p/775841#M246648</guid>
      <dc:creator>Dennis64</dc:creator>
      <dc:date>2021-10-22T09:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make this  outcome using this data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-this-outcome-using-this-data-set/m-p/775842#M246649</link>
      <description>&lt;P&gt;What is the logic here? And where does&amp;nbsp;&lt;SPAN&gt;F123G246H1 come from?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 09:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-this-outcome-using-this-data-set/m-p/775842#M246649</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-10-22T09:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to make this  outcome using this data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-this-outcome-using-this-data-set/m-p/775843#M246650</link>
      <description>&lt;P&gt;Please do&amp;nbsp;&lt;STRONG&gt;NOT&lt;/STRONG&gt; present example data in pictures. Post a data step that creates the dataset from DATALINES, and post it in a code box (see your welcome mail). Otherwise a lot of time has to be wasted by the people trying to help you by setting up data for testing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please describe the logic for calculating and placing those numbers.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 10:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-this-outcome-using-this-data-set/m-p/775843#M246650</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-10-22T10:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to make this  outcome using this data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-make-this-outcome-using-this-data-set/m-p/775992#M246701</link>
      <description>&lt;P&gt;Providing the data in a friendlier form and a bit more description of the desired outcome would reduce guesswork and increase motivation to post an answer to your question.&lt;/P&gt;
&lt;P&gt;Is below what you're after?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile datalines truncover dsd dlm=',';
  input customer_id :$20. var $ (unit1-unit4) (:best32.);
  datalines;
C23005A6,3,15,,39
146DX2356,4,11,,,5
B36AA323,3,10,15,20
F123G246H1,1,
;

data want;
  set have;
  array _units {*} unit:;
  do i=1 to dim(_units);
    if not missing(_units[i]) then 
      do;
        units_purchased=_units[i];
        output;
      end;
  end;
  keep customer_id units_purchased;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Oct 2021 02:30:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-make-this-outcome-using-this-data-set/m-p/775992#M246701</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-10-23T02:30:51Z</dc:date>
    </item>
  </channel>
</rss>

