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 (December 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 19 Dec 2008 09:00:25 -0800
Reply-To:     jfh@stanfordalumni.org
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject:      Re: is there an upper limit to items in proc format (using for
              matching data)
Comments: To: penny <pen@NY.JP>
In-Reply-To:  <gig4ma$f3i$1@news.motzarella.org>
Content-Type: text/plain; charset="ISO-8859-1"

Your format doesn't have an OTHER value - is that your intention, or did you mean for the OTHER value to be 'N'?

You don't need to reassign var1 to start - you can just rename it, and save some data movement.

You don't need to assign the constant 'Y' to order, and then assign order to label - just use "retain label 'Y';". You give label a different value at the end, but that happens only once, after all other values have been written, so there's no reason not to use retain.

If there are variables in MYDATASET besides VAR1, you can drop them with a data set option DROP or KEEP in the SET statement.

You can use a view to save more data movement.

I wouldn't name a variable EOF. That's a SAS reserved word, and while SAS handles the situation correctly it might be confusing to a human reader.

You'll end up with something like this: ===== (untested) data temp / view=temp;

retain fmtname 'kkk'; retain type 'c'; retain label 'Y';

set mydataset (keep=var1 rename=(var1=start)) end=eod;

output;

if eod then do; start='xxxxxxxxxxxxxx'; /* Perhaps you meant: hlo = 'o'; */ label='N'; output; end;

run; =====

On Fri, 19 Dec 2008 14:39:36 +0200, "penny" <pen@NY.JP> said: > in using something like this to later match or delete some data, is there > an upper > limit to how many items can be stored ? > > I know this can be done in proc sql but am wondering if there is some > limit like 99999 > rows ? > > finally, is there a better way of doing this / > > data temp; > retain fmtname 'kkk'; > retain type 'c'; > set mydataset end=eof; > order='Y'; > start=var1;label=order;output; > if eof then do; > start='xxxxxxxxxxxxxx' > order='N'; > label=order; > output; > end; > run; > > proc format cntlin=temp; > > then in a data step later > > if PUT(myvar,$kkk.)='Y' then .... either output or delete something

-- Jack Hamilton Sacramento, California jfh@alumni.stanford.org <== Use this, not jfh @ stanfordalumni.org


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