Date: Wed, 2 Jul 2003 11:46:14 -0400
Reply-To: Quentin McMullen <Quentin_McMullen@BROWN.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Quentin McMullen <Quentin_McMullen@BROWN.EDU>
Subject: Re: Keeping Variable of the Same Name
In-Reply-To: <f0afcb29.0307020718.79b46337@posting.google.com>
Content-Type: text/plain; charset="iso-8859-1"
scott wrote:
> Does anyone have a suggestion about the following problem?
>
>
> Dataset 'one' contains a character variable 'X'.
>
> Using the following code I would like to keep the new 'X' variable.
>
> data two (keep = X);
> set one;
>
> X = trim(X) || 'TEST';
>
> run;
>
> The old variable X is kept in 'two'.
Hmmmm....
My money would be that the length of X in one is $1, is that possible?
Maybe try:
> data two (keep = X);
length x $5; *<-- before set;
> set one;
>
> X = trim(X) || 'TEST';
>
> run;
Kind Regards,
--Quentin
|