× 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.



David:

Look in the "DB2 for i SQL Reference" for 7.1, and search for "DESCRIBE" ... there are several forms of the SQL DESCRIBE statement that can be used in a program (as "embedded SQL"):

DESCRIBE statement-name INTO :sqlda;
or
DESCRIBE CURSOIR USING SQL DESCRIPTOR 'DESCR1';
or
DESCRIBE PROCEDURE P1 USING SQL DESCRIPTOR 'DESC1';
or
DESCRIBE TABLE :tableName INTO :sqlda;

The various DESCRIBE statements return all sorts of information about the target in a (possibly large) SQLDA data structure.

HTH,

Mark S. Waterbury

> On 12/16/2015 10:23 AM, David Gibbs wrote:
On 12/15/2015 4:48 PM, Sue Romano wrote:
As the primary owner of the IBM i SQL BNF, I would be interested in
hearing what you are looking for in the statement text. If it is
something that might be generally useful (like a list of table
names), I might be able to create a service that uses the IBM i
parser to return these pieces of information.
Sue:

I'm primarily interested in parsing SQL source to identify objects used in the statement.

For example: Tables & views used by views, indexes, & mqts. Also, constraint relationships, triggers, etc.

I have the ability to process a BNF into a parser program, but an API that gives me the information would be even better.

david




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.