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 (April 2010, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 5 Apr 2010 18:01:24 -0700
Reply-To:   Sterling Paramore <gnilrets@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Sterling Paramore <gnilrets@GMAIL.COM>
Subject:   Re: vvaluex error handling
Comments:   To: Scott Barry <sbarry@sbbworks.com>
In-Reply-To:   <201004060048.o35J0IoD021630@malibu.cc.uga.edu>
Content-Type:   text/plain; charset=ISO-8859-1

Thanks, I've never used the "open" command before. Do you know what kind of performance hits there could be if it's executed each step?

-Sterling

On Mon, Apr 5, 2010 at 5:48 PM, Scott Barry <sbarry@sbbworks.com> wrote:

> On Mon, 5 Apr 2010 15:32:19 -0700, Sterling Paramore <gnilrets@GMAIL.COM> > wrote: > > >Dear SAS-L, > > > >I have some data with variable names like MembsEnr_Eff_Flag_200912, > >MembsEnr_Eff_Flag_201001, etc. (MembsEnr_Eff_Flag_YYYYMM). These fields > are > >either "Y" or "N". I also have another variable called > 'Membs_Enroll_yrmo,' > >but not all yearmonth values have a corresponding MembsEnr_Eff_Flag_YYYYMM > >field. I want to return rows where the flag field is "Y" and YYYYMM = > >'Membs_Enroll_yrmo'. I thought I'd use the vvaluex function (one I read > >about on this list, go SAS-L!), > > > >data EnrEff; > > set Enr (obs = 10); > > if vvaluex(cats("MembsEnr_Eff_Flag_",Membs_Enroll_yrmo)) = "Y" then > >output; > >run; > > > >This seems to work, but for every row where the variable does not exist, I > >get the following error message: > > > >NOTE: Argument to function VVALUEX is not a known variable name: > >MembsEnr_Eff_Flag_200812. > >NOTE: Invalid argument to function VVALUEX at line 18 column 8. > > > > > >The dataset is 90 million rows, so the log quickly grows too large to > handle > >with this output. Is there any way to suppress the note in the log or do > >better error handling? I was hoping for something like: > > > > if vvalue_exist(...) then .... > > > > > > > > > >Thanks, > >Sterling > > Suggested Google advanced search argument: > variable exist sas member site:sas.com > > Results (one of several) yielded: > > Sample 26003: Programatically determine if a variable exists in a data set > http://support.sas.com/kb/26/003.html > > Scott Barry > SBBWorks, Inc. >


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