LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 1998, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 9 Nov 1998 20:11:02 +0000
Reply-To:   Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Sender:   "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:   Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Subject:   Re: Help with variable

------- Forwarded message follows ------- Your Message

To: SAS-L@UGA.CC.UGA.EDU Subject: Re: Help with variable

Original message body follows...

In article <01be0382$be5006a0$6b8c4bce@default>, Richard James <rjames@pdci.on.ca> writes >Hello, > >I have a variable that is defined as a text variable. What I want to do is >create a new variable and have it complete an operation. > >What I have is a variable label PKG that looks like this: > >PKG > >10X100 >5X20ML >3X21 >. >. >. > >I want another column "Quantity" that is numeric to look like this: > >Quantity > >1000 >100 >63 >. >. >. > > >any suggestions on the best way?

One suggestion it might be worth pausing to think on

If this is to take place within a datastep you may have a problem, you are trying to use information generated a run time (the formula in the text variable) as if the information were available at compile time (rembering a datastep is compiled before it runs) so you have an immediate problem

resolve is a macro handling process execute might execute your formula, but only after the current step is complete

Other languages may have the required functionality, but not datastep, unless someone can put me straight.......

SAS might do what you want in an scl environment, using submit blocks to resolve the variables into executable code, but that is very similar to the effect of call execute.

just my opinion

just too too late -- Peter Crawford


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