<?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: Proc Append Duplicates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810402#M319579</link>
    <description>&lt;P&gt;Run it conditionally.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if %sysfunc(exist(data1)) %then %do;
proc delete data=data1; run;
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Or&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Use PROC DATASETS instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets nolist nowarn lib=work;
  delete data1;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 28 Apr 2022 15:49:20 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-04-28T15:49:20Z</dc:date>
    <item>
      <title>Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810324#M319554</link>
      <description>&lt;P&gt;hi i have a macro loop to append data which returns me duplicates for some reason for vars 2, 3 and 4&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to return unique values and not duplicates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please note i want this to apply to a wider macro and this is an example (there are more variables)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What i get from this macro is this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="248"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;Index&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;Variable&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.008232&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.003461&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.003461&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.006708&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.006708&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.000037&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.000037&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var4&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;PRE&gt;%macro test1;
%do i=1 %to 4;


proc append base=data1 data=data_&amp;amp;i force;
run;

data data1;
   set 
%if &amp;amp;i &amp;gt; 1 %then data1 ; data_&amp;amp;i;
run;


%end;
%mend;

proc delete data=data1;
run;

%test1;

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 10:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810324#M319554</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-28T10:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810325#M319555</link>
      <description>&lt;P&gt;First you do PROC APPEND, then you do SET, that's why you get duplicates. Essentially APPEND and SET do the same thing in this example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I said in your other thread, macros are not needed here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set var1 var2 var3 ... ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Since you have to type the list of data sets for the macro to work, just type it into the SET statement.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 09:54:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810325#M319555</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-28T09:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810327#M319556</link>
      <description>thanks for having look at this. It seems that i made a mistake in the code - apologies. I have now amended my initial post. Could you please have a quick look?</description>
      <pubDate>Thu, 28 Apr 2022 10:04:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810327#M319556</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-28T10:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810328#M319557</link>
      <description>&lt;P&gt;I don't see a difference. You still have made this unnecessarily complicated. Macros are not needed. PROC APPEND followed by a SET in a data step is redundant.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 10:16:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810328#M319557</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-28T10:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810333#M319560</link>
      <description>&lt;P&gt;Imho you should use proc append &lt;FONT size="5" color="#FF6600"&gt;&lt;STRONG&gt;OR&lt;/STRONG&gt;&lt;/FONT&gt; the data step.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 10:43:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810333#M319560</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-04-28T10:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810335#M319561</link>
      <description>&lt;P&gt;thanks and i am sorry as i am new here. How can i adjust the data step in order to merge all the data sets without typing all the names of the datasets?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 11:02:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810335#M319561</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-28T11:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810337#M319562</link>
      <description>&lt;P&gt;Explain how this list of data set names is known. Somehow, the programmer has to know how to access the list of names. Is it all the SAS data sets in a certain folder?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 11:21:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810337#M319562</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-28T11:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810343#M319563</link>
      <description>&lt;P&gt;&lt;SPAN&gt;This is part of a macro loop &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I get this list from this part of the code (see in the bottom). The value of &amp;amp;i takes values from 1 to value that let's say is equal to the number of variables. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;All files are saved in the WORK library&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;i want in the last loop to merge (if it is correct) all these dataset into one&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;data modeling_final;
set modeling_oot_1 data modeling_oot_2 data modeling_oot_3.......data modeling_oot_last;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data modeling_oot_&amp;amp;i; 
set modeling_oot_freq for_total;
keep order_rank PSI;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 11:56:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810343#M319563</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-28T11:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810344#M319564</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/372747"&gt;@Toni2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;This is part of a macro loop &lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then how does the programmer know what the file names are, so these names can be fed into the macro? I assume that it will change if you run the code today or if you run the code next month, otherwise there is no need for a macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not looking for example code now ... I am looking for a higher level explanation of the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 12:03:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810344#M319564</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-28T12:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810345#M319565</link>
      <description>&lt;P&gt;the code is huge in order to copy/paste here. In the bottom you can see the beginning of this code&amp;nbsp; (it is not all the code. it is only a part)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This macro is where (i believe) the &amp;amp;i is defined based on the code that i have copied below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro meannum;&lt;/P&gt;
&lt;P&gt;%do i=1 %to &amp;amp;vmcnt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/* list of numeric variables */
%let binnum=10; /* number of bins for numeric variables */
%let vartxt=ACCOUNT_STATUS; /* list of character variables */
%let imtxt=____; /* label for missing character values */
%let missnum=-999999999; /* label for missing character values */
%let yaxislabel=% Frequency; /* label for distribution */
%let labelmod=Population; /* label for modeling sample */
%let labeloot=Sample; /* label for validation sample */


********* Part II: Numeric Variables *********;

%macro dealnum;

%if %sysfunc(countw(&amp;amp;varnum dummyfill)) &amp;gt; 0 %then %do;

data check_contents;
retain &amp;amp;varnum;
set &amp;amp;inputset(keep=&amp;amp;varnum obs=1);
run;

proc contents data=check_contents varnum out=check_contents2 noprint;
run;

proc sort data=check_contents2(keep=name varnum) out=checkfreq(rename=(name=tablevar)); 
by varnum; 
run;

data varcnt; 
set checkfreq; 
varcnt+1;
run;

proc sql noprint;
select tablevar into :varmore separated by ' ' from varcnt;
quit;

proc sql;
create table vcnt as select count(*) as vcnt from varcnt;
quit;

data _null_; 
set vcnt;
call symputx('vmcnt', vcnt);
run;

proc sql noprint; 
select tablevar into :v1-:v&amp;amp;vmcnt from varcnt;
quit;

proc rank data=&amp;amp;inputset group=&amp;amp;binnum out=check_rank ties=low;
var &amp;amp;varnum;
ranks rank1-rank&amp;amp;vmcnt; 
run;

data check_rank;
set check_rank;
array fillmiss(*) rank1-rank&amp;amp;vmcnt;
do j=1 to dim(fillmiss);
if fillmiss(j)=. then fillmiss(j)=-1;
fillmiss(j)=fillmiss(j)+1;
end;
drop j;
run;

%macro meannum;
%do i=1 %to &amp;amp;vmcnt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 12:18:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810345#M319565</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-28T12:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810346#M319566</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm not looking for example code now ... I am looking for a higher level explanation of the problem.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 12:21:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810346#M319566</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-28T12:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810355#M319568</link>
      <description>&lt;P&gt;You are getting duplicates because you are appending the new data twice.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once using PROC APPEND and once using a DATA step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just pick one ONE of those two methods to use in your %DO loop.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 13:36:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810355#M319568</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-28T13:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810371#M319572</link>
      <description>thanks but my problem is the code for some reason creates duplicates</description>
      <pubDate>Thu, 28 Apr 2022 14:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810371#M319572</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-28T14:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810372#M319573</link>
      <description>thanks for the support</description>
      <pubDate>Thu, 28 Apr 2022 14:31:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810372#M319573</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-28T14:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810373#M319574</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/372747"&gt;@Toni2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;thanks but my problem is the code for some reason creates duplicates&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Remove either the PROC APPEND step or the DATA step and it will not duplicate the data.&lt;/P&gt;
&lt;P&gt;Just to spell it out:&lt;/P&gt;
&lt;P&gt;You want to&amp;nbsp;either use code like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%do i=1 %to 4;
proc append base=data1 data=data_&amp;amp;i force;
run;
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;OR code like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%do i=1 %to 4;
data data1;
   set 
%if &amp;amp;i &amp;gt; 1 %then data1 ; data_&amp;amp;i;
run;
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But don't use both step because then DATA_&amp;amp;I is appended TWICE.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 14:41:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810373#M319574</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-28T14:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810376#M319575</link>
      <description>&lt;P&gt;i use the PROC Append and works, thanks and sorry for the confusion. &lt;BR /&gt;Actually, now what happens is, when i run the code multiple times then the data1 becomes bigger and bigger...any idea how to resolve this? (sorry possibly this is what i missed to explain)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually, this is what i can see&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="248"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;ndex&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;Variable&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.008232&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.003461&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.003461&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var2&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.006708&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.006708&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.000037&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="77.7375px" height="30px"&gt;0.000037&lt;/TD&gt;
&lt;TD width="169.262px" height="30px"&gt;var4&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 15:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810376#M319575</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-28T15:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810378#M319576</link>
      <description>&lt;P&gt;I assume that you just need to REMOVE the old dataset before running the program again.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc delete data=data1; run;
%do i=1 %to 4;
proc append base=data1 data=data_&amp;amp;i force;
run;
%end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 15:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810378#M319576</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-28T15:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810393#M319577</link>
      <description>&lt;P&gt;it works again! thanks! When i run this for first time i get a warning that the data1 does not exist. Is there any way to avoid this as well? i ask since this is going to be part of a huge code and i want to avoid warnings/errors&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 15:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810393#M319577</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-28T15:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810402#M319579</link>
      <description>&lt;P&gt;Run it conditionally.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if %sysfunc(exist(data1)) %then %do;
proc delete data=data1; run;
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Or&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Use PROC DATASETS instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc datasets nolist nowarn lib=work;
  delete data1;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 15:49:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810402#M319579</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-28T15:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Append Duplicates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810572#M319640</link>
      <description>Thanks for the support &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 29 Apr 2022 10:44:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Append-Duplicates/m-p/810572#M319640</guid>
      <dc:creator>Toni2</dc:creator>
      <dc:date>2022-04-29T10:44:33Z</dc:date>
    </item>
  </channel>
</rss>

