Date: Thu, 29 Mar 2001 15:03:13 -0500
Reply-To: "Ravi, Prasad" <Prasad.Ravi@PFIZER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Ravi, Prasad" <Prasad.Ravi@PFIZER.COM>
Subject: Re: Making a Value of a Variable a Variable Name?
Content-Type: text/plain; charset="iso-8859-1"
The way I know to do this is
DATA ONE;
Patient=1234;
Sequence='UTAC';
RUN;
PROC SQL NOPRINT;
SELECT SEQUENCE INTO :MSEQ
FROM ONE;
CREATE TABLE NEW AS
SELECT *, 1 AS &MSEQ
FROM ONE;
QUIT;
PROC PRINT DATA=NEW;
RUN;
OBS PATIENT SEQUENCE UTAC
1 1234 UTAC 1
-----Original Message-----
From: Terry Fudin [mailto:t.fudin@GENAISSANCE.COM]
Sent: Thursday, March 29, 2001 2:23 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Making a Value of a Variable a Variable Name?
I wanted to make a value of a variable a Variable Name itself, and set it
to something.
For example:
Obs Patient Sequence
1 1234 UTAC
Want to set UTAC=1;
Resulting Dataset:
Obs Patient Sequence UTAC
1 1234 UTAC 1
Does anybody know what the best way to do this is?