SLD [ Intro | Pubs | WebTables | Workbook | Software | SLACVX | Search ]
[ WebTables : Help | Maintenance ]

Maintaining the SLD WebTables System

WTQUERY - the Oracle Interface Exec

A few general comments about WTQUERY are given here. For more details, study the extensive comments in the exec itself.

The Oracle Interface Exec handles the actual Oracle query. It is called from the middle of WTINTERMED.COM, the Intermediate Exec, via the "vmsproxy" system developed by Tony Johnson.

The Oracle Interface Exec forms the appropriate SQL code based on the information provided in the URL by which it was called plus information it finds in the Unix copies of the DATANAMES.DAT and Glossary files.

As was mentioned in our discussion of the Intermediate Exec, this Oracle Interface Exec URL is almost the same as the one by which the Intermediate Exec itself was called. (That URL is described in detail in the document: Constructing Plot and Table URLs by Hand).
The only difference is that, for the Oracle Interface Exec URL:

Care has been taken to make WTQUERY completely generic in the sense that it contains no hard-coded information about any particular dataname.

The various parts of the query are built separately, then combined at just before the query is sent off to RXS for Oracle action.
The parts are:

The above parts are built slightly differently depending on whether the user has chosen to Include or Exclude Oracle rows for which any of the requested data is invalid.

Other critical variables in WTQUERY are:

For ranges of the form "LAST n"

The actual Oracle query is executed through the REXX SQL Interface, RXS, written by Len Moss.

If the user has chosen to Include Oracle rows that contain invalid data, two columns of data will have been returned for each selected element. One is the basic data, the other is the count telling whether that element was invalid. The data from the two columns is appended together, delimited by a question mark.

The resulting columns of data, one for each dataname requested, are returned to the Intermediate Exec delimited by spaces.

As mentioned earlier, the Intermediate Exec then traps the output by a temporary redefinition of SYS$OUTPUT into a file of the form OO*.TMP (for Oracle Output).

One can set the Oracle Interface Exec to turn on tracing in WTQUERY and return debug output rather than normal output. To do this, hand edit the URL to WTINTERMED by prefacing the formtitle in the URL with the string "DB3" or "DB4".
For example

  /WTINTERMED/DB4CATER/...

Normal table or plot output will be interrupted, but useful debug output will then be found as disk$scr0:[sldwww]oo*.tmp
Joseph Perl
3 October 1997