Reputation: 289
I am about to start working with a System21 database and I am looking to find a file definition list. From reading the GEAC System21 IBM Handbook I found a few snippets like:
Is there a master list anywhere?
Upvotes: 0
Views: 539
Reputation: 532
The System i Database Catalog maintains a list of all tables / files on the system.
You can SQL query the catalog objects to get a list of tables, views, indexes, procedures, functions, etc.. The catalog objects are stored in library / schema QSYS2 and use a SYS object name prefix. To get a list of tables for a schema, run this query:
select * from QSYS2.SYSTABLES where TABLE_SCHEMA = 'supply your schema name here'
To get a list of most of the catalog objects, run this query:
select * from QSYS2.SYSTABLES where TABLE_SCHEMA = 'QSYS2' and TABLE_NAME like 'SYS%'
As I recall, some of the catalog objects are SQL views instead of tables, so to find those, run this query:
select * from QSYS2.SYSVIEWS where OBJECT_SCHEMA = 'QSYS2' and OBJECT_NAME like 'SYS%'
Upvotes: 1