|
But this does not in any way alter the existing dataset TRUENEW. It only
renames the variable in the DATA step's buffer. So if you inspect TRUENEW
after running this DATA step, you will find the original variable name
(CUST_NUM).
If it's necessary to permanently rename the variable in TRUENEW, run PROC
DATASETS against TRUENEW first, then run the DATA step without the RENAME
dataset option.
On Mon, 18 Nov 2002 14:36:36 -0500, Nevseta, Floyd G
<Floyd.G.Nevseta@BANKOFAMERICA.COM> wrote:
>Using the data set option, RENAME, on an input data set does, indeed,
rename
>the variable before processing begins. In fact, your BY statement is
>counting on it.
>
>I suspect you are having a problem. Share with us specifically what is
>happening (or not) in your code.
>
>Regards,
>Floyd
>
>-----Original Message-----
>From: Lu Liu [mailto:Lu.Liu@TALBOTS.COM]
>Sent: Monday, November 18, 2002 1:27 PM
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: Rename
>
>
>My question is after running the following statement, which variable should
>be in TRUENEW dataset: CUST_NUM or NEWCUSNO? I had always thought it
should
>be the NEWCUSNO as CUST_NUM has been renamed, but when running a program I
>am working on now, I think I was wrong. But I would like ask to confirm.
>
>
>DATA TRUENEW2;<?xml:namespace prefix = o ns =
>"urn:schemas-microsoft-com:office:office" />
>
> MERGE TRUENEW (IN=A RENAME=(CUST_NUM=NEWCUSNO))
>
> OLDNEWID;
>
> BY NEWCUSNO;
>
> IF A;
>
> RUN;
>
>
>
>Your assistance is greatly appreciated.
>
>
>
>Lu
|