BOUND_MODULE_INFO view
The BOUND_MODULE_INFO view returns information about modules bound into an ILE program or service program.
The values returned for the columns in the view are closely related to the values returned for *MODULE detail on the DSPPGM (Display Program) and DSPSRVPGM (Display Service Program) CL commands and the List ILE Program Information (QBNLPGMI) and the List Service Program Information (QBNLSPGM) APIs.
- *EXECUTE authority to the library containing the program or service program, and
- *READ authority to the program or service program.
The following table describes the columns in the view. The system name is MODULE_INF. The schema is QSYS2.
Column Name | System Column Name | Data Type | Description |
---|---|---|---|
PROGRAM_LIBRARY | PGM_LIB | VARCHAR(10) | The library containing the program or service program. |
PROGRAM_NAME | PGM_NAME | VARCHAR(10) | The program or service program containing the module. |
OBJECT_TYPE | OBJ_TYPE | VARCHAR(7) | Object type for PROGRAM_NAME.
|
BOUND_MODULE_LIBRARY | BDMODLIB | VARCHAR(10) | The library containing the module bound into PROGRAM_NAME at bind time. |
BOUND_MODULE | BDMOD | VARCHAR(10) | The module bound into PROGRAM_NAME. This is a copy of the module that was bound into PROGRAM_NAME. It is not the *MODULE object on the system. |
MODULE_ATTRIBUTE | ATTRIBUTE | VARCHAR(10) Nullable
|
The language in which the module is written. Can contain the null value, for example, for a module created by a compilation process internal to IBM®. |
MODULE_CREATE_TIMESTAMP | CREATE_TS | TIMESTAMP(0) Nullable
|
The timestamp when the module was created. Contains the null value if no timestamp is available. |
SOURCE_FILE_LIBRARY | SRCLIB | VARCHAR(10) Nullable
|
The name of the library that contains the source file used to
create the module. Contains the null value if no source file was used to create the module. |
SOURCE_FILE | SRCFILE | VARCHAR(10) Nullable
|
The name of the source file used to create the module. Contains the null value if no source file was used to create the module. |
SOURCE_FILE_MEMBER | SRCMBR | VARCHAR(10) Nullable
|
The name of the member in the source file. Contains the null value if no source file was used to create the module. |
SOURCE_STREAM_FILE_PATH | SRCSTMF | VARGRAPHIC(5000) CCSID 1200 Nullable
|
The absolute path to the source stream file that was used to create
this module. If the stream file is contained the /QSYS.LIB file system, will contain the path to the
stream file (e.g., /QSYS.LIB/library.LIB/filename.FILE/member.MBR) and the SOURCE_FILE,
SOURCE_FILE_LIBRARY, and SOURCE_FILE_MEMBER will contain the database equivalent name. Contains the null value if no source file was used to create the module. |
SOURCE_CHANGE_
TIMESTAMP |
SRC_CHGTS | TIMESTAMP(0) Nullable
|
The timestamp when the source that was used to create this module
was last changed. Contains the null value if no source file was used to create the module. |
MODULE_CCSID | TGTCCSID | INTEGER | The coded character set identifier (CCSID) for this module. |
SORT_SEQUENCE_LIBRARY | SRTSEQ_LIB | VARCHAR(10) Nullable
|
The name of the library that contained the sort sequence table used
when the module was compiled. This does not apply to SQL statements in the module. Can contain the
following special values:
Contains the null value if SORT_SEQUENCE contains a special value or is null. |
SORT_SEQUENCE | SRTSEQ | VARCHAR(10) Nullable
|
The name of the sort sequence table used when the module was
compiled. This does not apply to SQL statements in the module. Can contain the following special values:
Contains the null value if the module does not contain any sort sequence information. |
LANGUAGE_ID | LANGID | VARCHAR(7) Nullable
|
The language identifier used when the module was compiled. This
does not apply to SQL statements in the module. Can contain the following special value:
Contains the null value if the module does not contain any language identification information. |
DEBUG_DATA | DEBUG_DATA | VARCHAR(4) | Whether debug data was generated when this module was created. If
debug data exists, the module may be debugged using the source debugger.
|
OPTIMIZATION_LEVEL | OPTIMIZE | INTEGER | Optimization level for the module. Optimization improves the
performance of a module, but reduces the ability to immediately change and accurately display the
value of variables during debugging.
|
MAX_OPTIMIZATION_LEVEL | MAX_OPTLVL | INTEGER Nullable
|
The highest level of optimization this module could have at bind
time. If observability has been removed from the module, this maximum optimization level value might
not be the same as the one specified at module creation. The values are identical to the values for the OPTIMIZATION_LEVEL column. Contains the null value if the module is not restricted to a maximum optimization level. The module can be retranslated to any of the supported optimization levels. |
OBJECT_CONTROL_LEVEL | OBJSSI | CHAR(8) Nullable
|
The object control level for the module at the time it was bound
into PROGRAM_NAME. Contains the null value if there is no object control level for the module. |
RELEASE_CREATED_ON | CREATE_ON | CHAR(6) | The version, release, and modification level of the operating system on which the module was created, in VxRxMx format. |
TARGET_RELEASE | TGTRLS | CHAR(6) | The version, release, and modification level of the operating system for which the module was created, in VxRxMx format. |
CREATION_DATA | CREATEDATA | VARCHAR(6) | Whether the bound module has all the creation data and if that data
is observable or unobservable.
|
TERASPACE_STORAGE_ENABLED | TERASPACE | VARCHAR(4) | The teraspace storage capability for this bound module.
|
STORAGE_MODEL | STGMDL | VARCHAR(10) | Where the automatic and static storage for this bound module is
allocated at run time.
|
NUMBER_PROCEDURES | PROCS | INTEGER | The number of procedures defined in the module. This number includes the program entry procedure (PEP), if one was generated by the compiler for this module. |
NUMBER_PROCEDURES_BLOCK_
REORDERED |
PROCS_BRO | INTEGER | The number of procedures defined in the module that are block
reordered. If the module does not have block-order profiling data applied, this value will be zero. |
NUMBER_PROCEDURES_BLOCK_
ORDER_MEASURED |
PROCS_BOM | INTEGER | The number of procedures defined in the module that had block-order
profiling data collected at the time block-order profiling data was applied. If the module does not have block-order profiling data applied, this value will be zero. |
PROFILING_DATA | PRFDTA | VARCHAR(10) | The profiling data attribute for this bound module.
|
ALLOW_RTVCLSRC | RTVCLSRC | VARCHAR(4) | Whether the module has CL source data that can be retrieved from
the program.
|
USER_MODIFIED | USER_MOD | VARCHAR(4) Nullable
|
Indicates whether the module was changed by the user at bind time.
Contains the null value if the information is not available. |
LIC_OPTIONS | LICOPT | VARGRAPHIC(500) CCSID 1200 Nullable
|
The Licensed Internal Code options that are in use by the
module. Contains the null value if no LIC options were used for the module. |
LICENSED_PROGRAM | LICPGM | VARCHAR(13) Nullable
|
If the module was part of a licensed program at bind time, contains
the product number and the level of the licensed program. Contains the null value if the module was not part of a licensed program at bind time. |
PTF_NUMBER | PTF | CHAR(5) Nullable
|
The program temporary fix (PTF) that resulted in the creation of
the module. Contains the null value for user-created modules. |
APAR_ID | APAR_ID | CHAR(6) Nullable
|
The module was changed as the result of the authorized program
analysis report (APAR) with this identification number. Contains the null value if the module was not changed at bind time. |
SQL_STATEMENT_COUNT | NBRSTMTS | INTEGER | The number of SQL statements contained in the module. Contains 0 if there are no SQL statements in the module. |
SQL_RELATIONAL_DATABASE | RDB | VARCHAR(18) Nullable
|
The default relational database that was specified on the SQL
precompile. Can contain the following special value:
Contains the null value if no package was created for the module by the SQL precompiler or if the module does not contain SQL statements. |
SQL_COMMITMENT_CONTROL | ISOLATION | VARCHAR(5) Nullable
|
The level of commitment control that was specified on the SQL precompile.
Contains the null value if the module does not contain SQL statements. |
SQL_NAMING | NAMING | VARCHAR(4) Nullable
|
The convention used for naming objects in SQL statements.
Contains the null value if the module does not contain SQL statements. |
SQL_DATE_FORMAT | DATFMT | VARCHAR(4) Nullable
|
The date format attribute.
Contains the null value if the module does not contain SQL statements. |
SQL_DATE_SEPARATOR | DATSEP | CHAR(1) Nullable
|
The date separator attribute. Contains the null value if the module does not contain SQL statements. |
SQL_TIME_FORMAT | TIMFMT | VARCHAR(4) Nullable
|
The time format attribute.
Contains the null value if the module does not contain SQL statements. |
SQL_TIME_SEPARATOR | TIMSEP | CHAR(1) Nullable
|
The time separator attribute. Contains the null value if the module does not contain SQL statements. |
SQL_SORT_SEQUENCE_LIBRARY | SQL_SSEQLB | VARCHAR(10) Nullable
|
The name of the library that is used to locate the SQL sort
sequence table. The following special values can be returned:
Contains the null value if SQL_SORT_SEQUENCE contains a special value or if the module does not contain SQL statements. |
SQL_SORT_SEQUENCE | SQL_SRTSEQ | VARCHAR(10) Nullable
|
The sort sequence table name specified when the module was
compiled. The following special values can be returned:
Contains the null value if the module does not contain SQL statements. |
SQL_LANGUAGE_ID | SQL_LANGID | VARCHAR(7) Nullable
|
The language identifier specified when the module was compiled. The
following special value can be returned:
Contains the null value if the module does not contain SQL statements. |
SQL_DEFAULT_SCHEMA | DFTRDBCOL | VARCHAR(10) Nullable
|
The schema name used for unqualified names of tables, views,
indexes, and SQL packages in static statements. Contains the null value if there is no default schema name or if the module does not contain SQL statements. |
SQL_PATH | SQLPATH | VARCHAR(3483) Nullable
|
The list of libraries used during resolution of functions,
procedures, and data types within SQL statements. The list is in the form of repeating library
names, each surrounded by double quotes and separated by commas. Contains the null value if the module does not contain SQL statements. |
SQL_DYNAMIC_USER_PROFILE | DYNUSRPRF | VARCHAR(10) Nullable
|
The user profile used for dynamic SQL statements. The following
special values can be returned:
Contains the null value if the module does not contain SQL statements. |
SQL_ALLOW_COPY_DATA | ALWCPYDTA | VARCHAR(9) Nullable
|
Whether a copy of the data can be used in the implementation of an
SQL query.
Contains the null value if the module does not contain SQL statements. |
SQL_CLOSE_SQL_CURSOR | CLOSQLCSR | VARCHAR(10) Nullable
|
Specifies the CLOSQLCSR attribute.
Contains the null value if the module does not contain SQL statements. |
SQL_DELAY_PREPARE | DLYPRP | VARCHAR(4) Nullable
|
Indicates the delay prepare attribute.
Contains the null value if the module does not contain SQL statements. |
SQL_ALLOW_BLOCK | ALWBLK | VARCHAR(8) Nullable
|
Whether blocking is used to improve the performance of certain SQL statements.
Contains the null value if the module does not contain SQL statements. |
SQL_PACKAGE_LIBRARY | SQLPKGLIB | VARCHAR(10) Nullable
|
The name of the library the SQL package is in. Contains the null value if the module is not distributed or if the module does not contain SQL statements. |
SQL_PACKAGE | SQLPKG | VARCHAR(10) Nullable
|
The name of the SQL package created on the relational database
specified on the RDB parameter of the command that created this module. Contains the null value if the module is not distributed or if it does not contain SQL statements. |
SQL_RDB_CONNECTION_METHOD | RDBCNNMTH | VARCHAR(4) Nullable
|
Specifies the semantics used for CONNECT statements:
Contains the null value if the module is not distributed or does not contain SQL statements. |
Examples
- Find any bound modules that include source changes from the last 7
days.
SELECT * FROM QSYS2.BOUND_MODULE_INFO WHERE PROGRAM_LIBRARY = 'QGPL' AND SOURCE_CHANGE_TIMESTAMP > CURRENT TIMESTAMP - 7 DAYS ORDER BY SOURCE_CHANGE_TIMESTAMP DESC;
- Find bound modules in APPLIB that were built from source that does not reside in the
IFS.
SELECT * FROM QSYS2.BOUND_MODULE_INFO WHERE PROGRAM_LIBRARY = 'APPLIB' AND SOURCE_FILE_LIBRARY <> 'QTEMP' AND SOURCE_STREAM_FILE_PATH IS NULL ORDER BY SOURCE_FILE_LIBRARY, SOURCE_FILE, SOURCE_FILE_MEMBER;