<?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: Flaging the Incremental Data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Flaging-the-Incremental-Data/m-p/75664#M16308</link>
    <description>Dear Scott,&lt;BR /&gt;
&lt;BR /&gt;
Thank you very much for your prompt response but I couldn't get my desired output.&lt;BR /&gt;
&lt;BR /&gt;
I simplified my query and posting it as a seperate Thread.&lt;BR /&gt;
&lt;BR /&gt;
Best regards,&lt;BR /&gt;
Chris Nevin</description>
    <pubDate>Fri, 27 Feb 2009 12:10:44 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-02-27T12:10:44Z</dc:date>
    <item>
      <title>Flaging the Incremental Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-the-Incremental-Data/m-p/75662#M16306</link>
      <description>Dear SAS,&lt;BR /&gt;
I've two datasets (OLD &amp;amp; NEW) to compare and create an incremental report of New and Updated records (ie., difference between the two data). Also need to flag those records in a new variable as noted below.&lt;BR /&gt;
New or Updated data can be:&lt;BR /&gt;
1) a new record added where the subject is NEW (should be flaged as NN).&lt;BR /&gt;
2) a new record added to an existing subject (flaged as NE).&lt;BR /&gt;
3) a record modified (data correction) to an existing subject (MD).&lt;BR /&gt;
&lt;BR /&gt;
OLD file (plz copy and paste to .XLS and create a SAS dataset. First row includes the variables)&lt;BR /&gt;
&lt;BR /&gt;
SID1A	SOC_ABBR 	PT_TXT 	AEVNAM1A	AEVSTT1D	AEVEND1D	AEVCTU1C	AEVSEV1C&lt;BR /&gt;
1_00001	Musc	Arthralgia	PAIN IN THE ELBOW	30-Jan-2008	3-Mar-2008	0	1&lt;BR /&gt;
1_00003	Eye	Visual acuity reduced	SUBJECTIVE DESCREASE VISUAL ACUITY	28-Mar-2007	28-Jan-2008	0	1&lt;BR /&gt;
1_00004	Infec	Urinary tract infection	URINARY INFECTION	12-Apr-2007	13-Apr-2007	0	1&lt;BR /&gt;
1_00006	Infec	Nasopharyngitis	COLD	19-Mar-2007	7-Apr-2007	0	1&lt;BR /&gt;
1_00007	Infec	Influenza	FLU	9-Mar-2007	23-Apr-2007	0	2&lt;BR /&gt;
1_00008	Nerv	Amnesia	MEMORY LOSE	15-May-2008		.	1&lt;BR /&gt;
1_00009	Gastr	Toothache	TOOTHACHE	1-Jul-2007	1-Jul-2007	0	1&lt;BR /&gt;
1_00010	Skin	Skin lesion	PSORIASIS VS ECZEMA	5-May-2007	5-May-2007	1	1&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NEW file (plz copy and paste to .XLS and create a SAS dataset. First row includes the variables)&lt;BR /&gt;
&lt;BR /&gt;
SID1A	SOC_ABBR 	PT_TXT 	AEVNAM1A	AEVSTT1D	AEVEND1D	AEVCTU1C	AEVSEV1C&lt;BR /&gt;
1_00001	Musc	Arthralgia	PAIN IN THE ELBOW	30-Jan-2008	3-Mar-2008	0	1&lt;BR /&gt;
1_00003	Eye	Visual acuity reduced	SUBJECTIVE DESCREASE VISUAL ACUITY	28-Mar-2007	28-Jan-2008	0	1&lt;BR /&gt;
1_00004	Infec	Urinary tract infection	URINARY INFECTION	12-Apr-2007	13-Apr-2007	0	1&lt;BR /&gt;
1_00006	Infec	Nasopharyngitis	COLD	19-Mar-2007	7-Apr-2007	0	1&lt;BR /&gt;
1_00007	Infec	Influenza	FLU	9-Mar-2007	23-Apr-2007	0	2&lt;BR /&gt;
1_00008	Nerv	Amnesia	MEMORY LOSE	15-May-2008	22-Aug-2007	.	1&lt;BR /&gt;
1_00009	Gastr	Toothache	TOOTHACHE	1-Jul-2007	1-Jul-2007	0	1&lt;BR /&gt;
1_00009	Gastr	Vomiting	VOMITING	1-Apr-2007	6-Apr-2007	0	2&lt;BR /&gt;
1_00010	Skin	Skin lesion	PSORIASIS VS ECZEMA	5-May-2007	5-May-2007	1	1&lt;BR /&gt;
1_00011	Inj&amp;amp;P	Thermal burn	BURN	25-Aug-2007	15-Sep-2007	0	1&lt;BR /&gt;
1_00012	Infec	Upper respiratory tract infection	UPPER RESPIRATORY INFECTION	11-Jan-2008	20-Jan-2008	0	1&lt;BR /&gt;
&lt;BR /&gt;
In the NEW file, I've added&lt;BR /&gt;
2 new records where the subjects are NEW (1_00011 &amp;amp; 1_00012)&lt;BR /&gt;
1 new record to an existing subject (1_00009).&lt;BR /&gt;
1 record modified (data correction) to an existing subject (1_00008).&lt;BR /&gt;
&lt;BR /&gt;
Hence the incremental data should have only 4 records with the following flags in a new variable:&lt;BR /&gt;
2 NN, 1NE, 1MD&lt;BR /&gt;
&lt;BR /&gt;
Awaiting your response.&lt;BR /&gt;
&lt;BR /&gt;
Best regards,&lt;BR /&gt;
Chris Nevin</description>
      <pubDate>Fri, 27 Feb 2009 06:12:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-the-Incremental-Data/m-p/75662#M16306</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-27T06:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging the Incremental Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-the-Incremental-Data/m-p/75663#M16307</link>
      <description>I will offer you some suggestions for SAS coding - surely you are looking for guidance and not just someone to do your work, right?&lt;BR /&gt;
&lt;BR /&gt;
One approach is code up a DATA step to read the two inputs, creating SAS files, then sort the data, and use PROC COMPARE to generate an output with differences, and you should have the desired results, I would say.&lt;BR /&gt;
&lt;BR /&gt;
The SAS product documentation is hosted at the SAS support website  &lt;A href="http://support.sas.com/" target="_blank"&gt;http://support.sas.com/&lt;/A&gt;  and you will also find many additional technical papers on various SAS programming topics at the site.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 27 Feb 2009 08:13:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-the-Incremental-Data/m-p/75663#M16307</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-02-27T08:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Flaging the Incremental Data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flaging-the-Incremental-Data/m-p/75664#M16308</link>
      <description>Dear Scott,&lt;BR /&gt;
&lt;BR /&gt;
Thank you very much for your prompt response but I couldn't get my desired output.&lt;BR /&gt;
&lt;BR /&gt;
I simplified my query and posting it as a seperate Thread.&lt;BR /&gt;
&lt;BR /&gt;
Best regards,&lt;BR /&gt;
Chris Nevin</description>
      <pubDate>Fri, 27 Feb 2009 12:10:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flaging-the-Incremental-Data/m-p/75664#M16308</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-27T12:10:44Z</dc:date>
    </item>
  </channel>
</rss>

