Date: Tue, 15 Jan 2008 23:46:31 -0800
Reply-To: Pietro_L <liege_come@YAHOO.FR>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Pietro_L <liege_come@YAHOO.FR>
Subject: Re: Proc append
Content-Type: text/plain; charset=ISO-8859-1
On Jan 16, 5:17 am, nos...@HOWLES.COM ("Howard Schreier <hs AT dc-sug
DOT org>") wrote:
> On Tue, 15 Jan 2008 01:22:29 -0800, Pietro_L <liege_c...@YAHOO.FR> wrote:
> >I have a problem to append 2 data, with the proc append.
> >This is the procedure I use:
> >proc append base=data1 data=data2 force;
> >If the second data has some variables which are not present in the
> >base (data1), the append procedure doesn't put these variables in the
> >Do you know how I can get round this problem.
> No. PROC APPEND can add only observations, not variables.
> You could use the ALTER statement in PROC SQL to add the needed columns
> (variables), then use PROC APPEND. However, that's more complicated yet
> unlikely to be more efficient.
> >I know if I use this code it will be ok, but I prefer append
> > %if &i = 1 %then %do;
> > data &tab_out; set temp;
> > run;
> > %end;
> > %else %do;
> > data &tab_out; set &tab_out temp;
> > %end;
> >Thanks you.- Hide quoted text -
> - Show quoted text -
Thank you very much.
Have a nice day