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 (June 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 20 Jun 2006 07:07:48 -0700
Reply-To:     TK <Tony.Kelleher@CSO.IE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         TK <Tony.Kelleher@CSO.IE>
Organization: http://groups.google.com
Subject:      Re: Working on String mathematical expressions
Comments: To: sas-l@uga.edu
In-Reply-To:  <46638d360606200015if3b62f0y9a408de3d76e69ab@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I have amended Guido T's code a little as you say that you want your new variable to be numeric. Both yours and Guido T's code have the new variable as a character one. See change in the length statement and use of the INPUT function below:

data x; length var1 $100; input var1 & $; y = input (resolve('%eval('||var1||')'),8.); cards; 1+ 2 + 3 (3 + 4 ) * 5 (30 - 20) + 100 ; run;

Regards,

Tony


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