|
I probably don't understand the problem. *Something* has to know
about the change; I assume it dosen't suffice to reissue the libname
to point library X to the physical dataset associated with library Z
or to concatentate library Z to library X.
In any case, instead of parsing the SAS log couldn't you use ODS to
redirect Proc SQL output into a table and read that? That should
simplify the parsing considerably.
Cheers,
Jonathat
JackHamilton@FIRSTHEALTH.COM (Jack Hamilton) wrote in message news:<s1530bf6.040@SLCM02.firsthealth.com>...
> Is it possible to specify an SQL view which uses the libname it's used
> from for data sets in its FROM clause?
>
> Let me give an example.
>
> I have a data set A in library X.
>
> I create a view, something like
>
> create view x.B as
> select *
> from x.a
> where cost > 100;
>
> Suppose that I now move A and B to library Z (with an OS command). I
> want view B to point to Z.A automatically, without my having to recreate
> it.
>
> In other words, I want something like
>
> create view x.B as
> select *
> from _libname_in_create_clause_.a
> where cost > 100;
>
>
> where _libname_in_create_clause_ is a special keyword.
>
> I can't think of a logical reason why this can't be done. You might
> move the view to a directory where A doesn't exist, of course, but you
> can do that now.
>
> I thought about just recreating the view automatically with the results
> of DESCRIBE view, but I decided that that would be too difficult - I'd
> have to write a program which could parse read the SAS log and parse
> SQL.
|