Date: Mon, 8 Sep 2003 14:22:41 -0700
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
run=1; stop=1; leave=1; set=1; output;
run=2; stop=3; leave=4; set=5; output;
Now do you mean for SAS to count 'data', 'run', 'stop', 'leave' and
as reserved words in the DATA step? If so, then surely this is not
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;
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
David Cassell, CSC
Senior computing specialist