View information in system views

Information about views in a database is in the system view SYS.SYSVIEW. See Chapter 8, “System Tables and Views,” in Reference: Building Blocks, Tables, and Procedures.

You can use Interactive SQL to browse the information in this view. Type the following statement in the dbisql command window to see all the columns in the SYS.SYSVIEW view:

SELECT * 
FROM SYS.SYSVIEW

To extract a text file containing the definition of a specific view, use a statement such as the following:

SELECT view_def FROM SYS.SYSVIEW 
WHERE view_object_id = 1583;
OUTPUT TO viewtext.sql
FORMAT ASCII