Date: Fri, 19 Dec 2008 09:00:25 -0800
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
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
You'll end up with something like this:
data temp / view=temp;
retain fmtname 'kkk';
retain type 'c';
retain label 'Y';
set mydataset (keep=var1 rename=(var1=start)) end=eod;
if eod then
/* Perhaps you meant: hlo = 'o'; */
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;
> if eof then do;
> proc format cntlin=temp;
> then in a data step later
> if PUT(myvar,$kkk.)='Y' then .... either output or delete something
firstname.lastname@example.org <== Use this, not jfh @ stanfordalumni.org