All schemas, tables, views, SQL packages, and indexes referenced
in SQL statements in an SQL program are placed in the object information repository
(OIR) of the library when the program is created.
You can use the CL command Display Program References
(DSPPGMREF) to display all object references in the
program. If the SQL naming convention is used, the library name is stored
in the OIR in one of three ways:
- If the SQL name is fully qualified, the collection name is stored as the
name qualifier.
- If the SQL name is not fully qualified and the DFTRDBCOL parameter is
not specified, the authorization ID of the statement is stored as the name
qualifier.
- If the SQL name is not fully qualified and the DFTRDBCOL parameter is
specified, the schema name specified on the DFTRDBCOL parameter is stored
as the name qualifier.
If the system naming convention is used, the library name is
stored in the OIR in one of three ways:
- If the object name is fully qualified, the library name is stored as the
name qualifier.
- If the object is not fully qualified and the DFTRDBCOL parameter is not
specified, *LIBL is stored.
- If the SQL name is not fully qualified and the DFTRDBCOL parameter is
specified, the schema name specified on the DFTRDBCOL parameter is stored
as the name qualifier.