LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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


Back to: Top of message | Previous page | Main SAS-L page