Schutte, Michael D wrote:
I'm confused. You're wanting to programmatically generate the sql for what? The view?
I wasn't asking how to programmatically generate the SQL for an already
extant view; the object is to generate SQL for a new view, with
field-renaming and calls to my "DISPLAYVAL" UDF where applicable, and
with a WHERE clause that calls some customer-specific censorship UDF,
when the based-on PF is modified and regenerated: the sole purpose of
the view (one of many) is to provide a "new data access layer" by which
SQL-based reporting tools can access the application database with (1)
field names based on the PF's column headings, (2) "table-driven" fields
resolved from their internal coding to what is shown in the application,
and (3) any censorship the customer imposes on the database preserved.
The only question was, given a source member containing SQL source for
RUNSQLSTM, is there a way to "INCLUDE" other source members, analogous
to "/COPY" in ILE RPG, or "#include" in C?