<?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 How do I create Bypass report from Final dataset. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-Bypass-report-from-Final-dataset/m-p/720859#M223342</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have below data in my final dataset.&lt;/P&gt;&lt;P&gt;SSN REC_TYPE Name&lt;BR /&gt;123 53 Mukesh&lt;BR /&gt;123 35 Mukesh&lt;BR /&gt;123 01 Mukesh&lt;BR /&gt;234 53 Rajesh&lt;BR /&gt;234 35 Rajesh&lt;BR /&gt;345 53 Madhan&lt;BR /&gt;345 35 Madhan&lt;BR /&gt;345 01 Madhan&lt;BR /&gt;456 35 Richa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a bypass report if my SSN is not present in any of the REC_TYPE (35,53,01)&lt;/P&gt;&lt;P&gt;I am expecting below result for my Bypass dataset.&lt;/P&gt;&lt;P&gt;234 53 Rajesh&lt;BR /&gt;234 35 Rajesh&lt;/P&gt;&lt;P&gt;456 35 Richa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 22 Feb 2021 08:57:31 GMT</pubDate>
    <dc:creator>msharma1788</dc:creator>
    <dc:date>2021-02-22T08:57:31Z</dc:date>
    <item>
      <title>How do I create Bypass report from Final dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-Bypass-report-from-Final-dataset/m-p/720859#M223342</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have below data in my final dataset.&lt;/P&gt;&lt;P&gt;SSN REC_TYPE Name&lt;BR /&gt;123 53 Mukesh&lt;BR /&gt;123 35 Mukesh&lt;BR /&gt;123 01 Mukesh&lt;BR /&gt;234 53 Rajesh&lt;BR /&gt;234 35 Rajesh&lt;BR /&gt;345 53 Madhan&lt;BR /&gt;345 35 Madhan&lt;BR /&gt;345 01 Madhan&lt;BR /&gt;456 35 Richa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a bypass report if my SSN is not present in any of the REC_TYPE (35,53,01)&lt;/P&gt;&lt;P&gt;I am expecting below result for my Bypass dataset.&lt;/P&gt;&lt;P&gt;234 53 Rajesh&lt;BR /&gt;234 35 Rajesh&lt;/P&gt;&lt;P&gt;456 35 Richa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 08:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-Bypass-report-from-Final-dataset/m-p/720859#M223342</guid>
      <dc:creator>msharma1788</dc:creator>
      <dc:date>2021-02-22T08:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create Bypass report from Final dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-Bypass-report-from-Final-dataset/m-p/720876#M223347</link>
      <description>&lt;P&gt;How is tihs code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  length  ssn 8 rec_type $2 name $8;
  input ssn rec_type name;
datalines;
123 53 Mukesh
123 35 Mukesh
123 01 Mukesh
234 53 Rajesh
234 35 Rajesh
345 53 Madhan
345 35 Madhan
345 01 Madhan
456 35 Richa
;
run;

/* transpose */
proc transpose data=have out=trans prefix=var_;
  var name;
  by ssn;
  id rec_type;
run;

/* Return transpose where SSN is not present in any of the REC_TYPE (35,53,01)  */
proc transpose data=trans(where=(var_01='' or var_35='' or var_53='')) out=next;
  var var:;
  by ssn;
run;

/* rename and modify data */
data want(drop=_name_);
  length  ssn 8 rec_type $2 name $8;
  set next;
  rec_type=scan(_NAME_,2,'_');
  where name ne '';
run;


&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 11:30:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-Bypass-report-from-Final-dataset/m-p/720876#M223347</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-02-22T11:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create Bypass report from Final dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-Bypass-report-from-Final-dataset/m-p/720884#M223350</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input SSN REC_TYPE Name $;
cards;
123 53 Mukesh
123 35 Mukesh
123 01 Mukesh
234 53 Rajesh
234 35 Rajesh
345 53 Madhan
345 35 Madhan
345 01 Madhan
456 35 Richa
;

proc sql;
create table want as
select * from have where ssn not in (
select distinct ssn from have 
 group by ssn
  having sum(REC_TYPE=35)&amp;gt;0 and sum(REC_TYPE=53)&amp;gt;0 and sum(REC_TYPE=01)&amp;gt;0 
);
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Feb 2021 11:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-create-Bypass-report-from-Final-dataset/m-p/720884#M223350</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-02-22T11:43:04Z</dc:date>
    </item>
  </channel>
</rss>

