Date: Thu, 31 Oct 2002 09:17:29 -0500
Reply-To: Ian Whitlock <WHITLOI1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Whitlock <WHITLOI1@WESTAT.COM>
Subject: Re: tricky question
Content-Type: text/plain; charset="iso-8859-1"
Paul,
I was mistaken. When you answered Philip's question:
> > My problem is - is there a way to dynamically create list of
> > all data sets
***
> > either used or created in some specific SAS code. ....
with
> Instead of writing your own code parser, as was suggested in
> one of the
> replies, why not use the SAS Supervisor with its ability to recognize,
> uncover, and report exactly the stuff you are looking for. ....
I thought you were making a claim to answer his question. Peter gave the
warning
>>> ......until someone switches off system option NOTES. ....
I said
<Perhaps with version 8.2
< options obs = 0 ;
< %inc yourcode ;
<and a search of the log would be sufficient for your purposes, although it
<could easily be broken.
So when you gave good code to carry out the plan without a disclaimer, I
thought it necessary to add one. None of these comments should be taken as
detracting from your original code.
Your example,
> data w%substr(%sysfunc(ranuni(0),3,10) ; [sic.]
> set w ;
> run ;
makes it very clear that it is impossible to identify all datasets created
for an arbitrary SAS program by either knowing the code or viewing the log
of a preparatory run. Moreover, I suspect no computer language so rigid
that a similar trick could not be used when multiple steps are allowed to be
called one program. (Of course many languages have the flexibility to not
even require multiple steps for this simple trick.)
I wrote:
< It is the fact that in SAS, any iteration of any step
< may determine what future code steps are executed that makes
< limiting the number of observations problematic.
My interest here was in the fact that the step concept is built into the
SAS language rather than imposed from the outside by the operating system.
On this point you wrote:
>
>SAS is not unique in this respect. The same can be said about any language
>capable of writing flexcode (most of 3GLs are), and even about the
>super-rigid JCL - whose structure, hardly accidentally, reminds that of a
>multi-step SAS program.
I am not familiar with the term, what is flexcode? I would also appreciate
a reminder on what makes a language a 3GL and on how many GLs we now have.
Thanks.
IanWhitlock@westat.com