Date: Tue, 15 Jan 2002 14:44:20 -0800
Reply-To: gwarnick@fhcrc.org
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: greg warnick <gwarnick@SNAP.FHCRC.ORG>
Organization: Fred Hutchinson Cancer Research Center
Subject: Re: a question on merge
Content-Type: multipart/alternative;
--------------48BB9FD865870333C96BA56F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
i think this is what you're looking to do, it involves a new variable though to show source of data.
:-!
data both ;
set ps94 (in=ps94)
ps95 ;
if ps94 then year = 1 ;
else year = 2 ;
run ;
Zhonghe Li wrote:
> Hi everyone, I have two files (PS94 and PS95). They contain same variables (same variable name)
> for two different years. Now I need to merge them into one file, but I need all the two year
> variables in the file. Is there an easy way to do so without renaming the variables (a lot
> variables to rename)? Thank you for your help. Zhonghe
--------------48BB9FD865870333C96BA56F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<body bgcolor="#FFFFFF">
i think this is what you're looking to do, it involves a new variable though
to show source of data. :-!
<p>data both ;
<br> set ps94 (in=ps94)
<br> ps95 ;
<br> if ps94 then year = 1 ;
<br> else year = 2 ;
<br> run ;
<p>Zhonghe Li wrote:
<blockquote TYPE=CITE><style></style>
<font face="Arial"><font size=-1>Hi
everyone,</font></font> <font face="Arial"><font size=-1>I have two
files (PS94 and PS95). They contain same variables (same variable
name) for two different years. Now I need to merge them into one
file, but I need all the two year variables in the file.</font></font> <font face="Arial"><font size=-1>Is
there an easy way to do so without renaming the variables (a lot variables
to rename)?</font></font> <font face="Arial"><font size=-1>Thank you
for your help.</font></font> <font face="Arial"><font size=-1>Zhonghe</font></font></blockquote>
</body>
</html>
--------------48BB9FD865870333C96BA56F--