Date: Mon, 8 Sep 2003 14:22:41 -0700
Reply-To: cassell.david@EPAMAIL.EPA.GOV
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "David L. Cassell" <cassell.david@EPAMAIL.EPA.GOV>
Subject: Re: HELP: Is there a way to extract reserved words from SAS ?
Content-type: text/plain; charset=US-ASCII
Lars Lykkestjerne Jacobsen <lykkestjerne@PERSON.DK> added:
> If so, can they be categorised ?
In what way?
If you mean 'reserved words' in the sense of the C programming language,
then SAS is somewhat looser than you are expecting. Take a look at
this code:
data data;
run=1; stop=1; leave=1; set=1; output;
run=2; stop=3; leave=4; set=5; output;
run;
Now do you mean for SAS to count 'data', 'run', 'stop', 'leave' and
'set'
as reserved words in the DATA step? If so, then surely this is not
legal
code, and this would abort horribly...
13 data data;
14 run=1; stop=1; leave=1; set=1; output;
15 run=2; stop=3; leave=4; set=5; output;
16 run;
NOTE: The data set WORK.DATA has 2 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
Oh well, the log says that this is entirely acceptable. The SAS parser
can tell what is a variable name.
Paul Choate has provided some valauble information (as always), but
the nature of the SAS system is such that a search for 'reserved' words
will first necessitate your defining what you mean by 'reserved', and in
what context(s).
HTH,
David
--
David Cassell, CSC
Cassell.David@epa.gov
Senior computing specialist
mathematical statistician