|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 -------
Subject: Re: Help with variable
Original message body follows...
In article <01be0382$be5006a0$6b8c4bce@default>, Richard James
>I have a variable that is defined as a text variable. What I want to do
>create a new variable and have it complete an operation.
>What I have is a variable label PKG that looks like this:
>I want another column "Quantity" that is numeric to look like this:
>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