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 (August 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 3 Aug 2008 14:02:21 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>"
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>"
Subject:      Re: conditonally add/remove variables and numerical programming

On Sun, 3 Aug 2008 09:02:58 -0700, Learner <cnfengshuang@GMAIL.COM> wrote:

>Hi, > >I have a large set of time series data to process, variables include >month, flow, and other values. > >For each month, if flow>0, then I will generate a variable a_month, >where month refers to the particular month. I know how to generate >this "a_month" variable now. (Thanks to the help I got here!) There >will be a group of such variables for each year. For my computation, I >need delete all these "a_month" at the end of each year, and I will >repeat the same thing for the next year. I need to drop all the >a_month variables to save the system resource. > >For each month, with the variables created above, I need to do a >numerical "Goal seek" programming. Without, creating/deleting the >variables correctly, now I couldn't do this. > >Basically, what I want to do is as below: > >if Flow>0 >=> create a new variable "a_month" for this month >=> use all the up-to-current "a_month" variables to do numerical "Goal >Seek" >=>...(Do this for each month during a year) >=> at year end, delete all the previous "a_month" variables >=>create a new "a_month" variable in the first month of the following >year >=>repeat the above routine for each year. > >What I know now, is to create global "a_month" variables. But I hope >to execute the program month by month, instead of having a "a_month" >variable for all the month. Could anyone help me? Thanks a lot!! > >Learner

Please post an example and indicate what language you intend to use (DATA step, IML, ...).

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