| Date: | Tue, 28 Jan 2003 11:35:07 -0800 |
| Reply-To: | Yadong Zhang <yzhang@OXHP.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Yadong Zhang <yzhang@OXHP.COM> |
| Organization: | http://groups.google.com/ |
| Subject: | Dynamic format name |
| Content-Type: | text/plain; charset=ISO-8859-1 |
Hello,
I have a table lookup problem I'm trying to solve with 'Dynamic Format
Name', ie, the format name is derived from another variable.
For example,
I have two predefined formats: $fa and $fb,
I want to create a new variable C based on the format stored in
variable F
data a;
F='fa'; B='100'; output;
F='fb'; B='100'; output;
run;
data b;
set a;
C=put(B, '$' || F ||'.');
run;
Is this doable? Is there any easy alternative?
Thanks in advance.
Yadong
|