Date: Fri, 4 Jan 2002 09:05:36 -0500
Reply-To: "Fehd, Ronald J." <rjf2@CDC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Fehd, Ronald J." <rjf2@CDC.GOV>
Subject: Re: Name prefix lists
Content-Type: text/plain
> From: Roger Lustig [mailto:rlustig@CBDCREDIT.COM]
> The log that follows demonstrates an oddity in SAS DATA step
> syntax, or
> something. Not painful once it's clear, but not well
> documented either, as far as I can tell.
>
> SAS V8 has three types of variable-name lists:
> --Numbered lists, such as STAT1-STAT6
> --name-range lists, such as STAT1--STUFF6 (plus variants)
> --name prefix lists, such as STAT:
>
> Obviously the former explicitly tells the DATA step how many variables
> there are, while the latter does not.
This is a tangential-topic comment:
One of the items that I'd like to get more clear about in my further
polishing of the Writing For Reading SAS Style Sheet
is what is an optimal ordering of the the declarative and executable
statements. In my own R&D I have found that alphabetizing the statements
gets me some not-quite-what-I-wanted stuff.
currently I recommend:
DATA X(
drop =
keep =
rename = ()
);
attrib VarA length = $ 8 format=x. <informat=ix.> label='x';
array ...;
retain ...;
if I don't need/want to declare all the attrib razzle-dazzle of format+label
then I replace the attrib statement with length, again, before any other
declarative statements.
%0.02,
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
SUGI 25: 2000 Indianapolis IN
App Dev 38 Writing for Reading SAS Style Sheet
The Writing for Reading SAS R Style Sheet:
Tricks, Traps & Tips from SAS-L's Macro Maven
http://www2.sas.com/proceedings/sugi25/25/ad/25p038.pdf
remember perspective: the error is not always where it seems to occur! --
RJF2
Your task is simple: remove the difference
between how things should be
and how they really are.
-- Ashleigh Brilliant pot-shot #4247