× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 03 Sep 2013 14:53, Hoteltravelfundotcom wrote:
I have a VIEW but was written now some weeks back. I would like to
see the actual code that created this view.

The definition of the VIEW, the CREATE statement, is stored in the *FILE object. That information is available from the DSPFD command, the Retrieve Database File Description (QDBRTVFD) API, and the Generate Data Definition Language (QSQGNDDL) API. That statement is also reflected in the *DBXREF data, so that same information can come from the SQL Catalog as well; e.g. SYSVIEWS. Any interface that exposes that information from either the file object or the catalogs, can provide the information in various other forms; e.g. iNav Database.

If I look back in STRSQL, how can I be assured that I am looking at
the latest one?

Normally the statement would be the last chronologically ordered successful CREATE that was not later rolled back; saving the session to a source file and then scanning the source with a /find/ feature is easier IMO than trying to scroll through the interactive session log. However that method presumes that the correct\only session of yours was being reviewed, additionally that it was your session that issued the CREATE versus the session of someone else, and that the CREATE was not performed via an entirely different interface [yet if created from RUNSQLSTM, the source member and source date\time should be recorded in the object OIR].

As others have suggested, getting the definition from the current object [or from the catalogs which should reflect the current object] is probably best.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.