Well, thanks! Although I wouldn't say that having to parse the text was trivial as there can be multiple joins and multiple FROM clauses.
I did want to be able to automatically recreate views when modifying a physical file. I can go from DSPDBR to SYSVIEWDEP to SYSVIEW to get the source to create the view, but executing that does not seem to be an obious matter either.
I think it would be best to store the instructions in a source file or program and use the view's system name to identify which program or source to use to create the view.
-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de CRPence
Envoyé : jeudi 31 juillet 2008 02:23
À : midrange-l@xxxxxxxxxxxx
Objet : Re: DSPFD SQL instructions
Although parsing the TEXT is somewhat trivial for the TABLE names referenced in the FROM clause, I believe what you are looking for is SYSVIEWDEP instead of SYSVIEWS to see the relationships.
Regards, Chuck
David FOXWELL wrote:
There doesn't seem to be anyway of finding the table used for the view
without looking at the TEXT field.
Maybe DSPDBR first and then join on SYSVIEWS. Is that reasonable?
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.