<?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: two records to a single record in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/two-records-to-a-single-record/m-p/858126#M339042</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/411017"&gt;@znhnm&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't provide any test data, so this is an untested solution, bot I think you could use something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table want as select distinct&lt;BR /&gt;     score,&lt;BR /&gt;     max(event) as event,&lt;BR /&gt;     max(nonevent) as nonevent&lt;BR /&gt;   from have&lt;BR /&gt;   group by score;&lt;BR /&gt;quit;&lt;BR /&gt;   &lt;BR /&gt;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Feb 2023 19:20:46 GMT</pubDate>
    <dc:creator>ErikLund_Jensen</dc:creator>
    <dc:date>2023-02-09T19:20:46Z</dc:date>
    <item>
      <title>two records to a single record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-records-to-a-single-record/m-p/858125#M339041</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a column called "score" in my SAS dataset. Each "score" has two records with for c_flag=1 and c_flag=0. When c_flag=1 the "event" column has a value but "nonevent" column is missing. When c_flag=0 the "nonevent" column has a value but "event" column is missing. I want to create another dataset that will list the uniq values of "score" and write the nonmissing event and nonevent values. How do I write this code?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 19:10:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-records-to-a-single-record/m-p/858125#M339041</guid>
      <dc:creator>znhnm</dc:creator>
      <dc:date>2023-02-09T19:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: two records to a single record</title>
      <link>https://communities.sas.com/t5/SAS-Programming/two-records-to-a-single-record/m-p/858126#M339042</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/411017"&gt;@znhnm&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't provide any test data, so this is an untested solution, bot I think you could use something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   create table want as select distinct&lt;BR /&gt;     score,&lt;BR /&gt;     max(event) as event,&lt;BR /&gt;     max(nonevent) as nonevent&lt;BR /&gt;   from have&lt;BR /&gt;   group by score;&lt;BR /&gt;quit;&lt;BR /&gt;   &lt;BR /&gt;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Feb 2023 19:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/two-records-to-a-single-record/m-p/858126#M339042</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2023-02-09T19:20:46Z</dc:date>
    </item>
  </channel>
</rss>

