Start of change

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.

Authorization: The caller must have:
  • *USE authority to the program or service program, and
  • *EXECUTE authority to the library containing the program or service program.

The following table describes the columns in the view. The system name is MODULE_INF. The schema is QSYS2.

Table 1. BOUND_MODULE_INFO view
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.
*PGM
A program.
*SRVPGM
A service program.
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_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:
*LIBL
The sort sequence table is found in the library list when PROGRAM_NAME runs this module.
*CURLIB
The sort sequence table is found in the current library when PROGRAM_NAME runs this module.

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:
*HEX
No sort sequence is used.
*JOBRUN
The sort sequence value associated with the job at the time PROGRAM_NAME runs this module is used.
*LANGIDSHR
The shared sort sequence for the language identifier is used.
*LANGIDUNQ
The unique sort sequence for the language identifier is used.

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:
*JOBRUN
The language identifier associated with the job at the time PROGRAM_NAME runs this module.

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.
*NO
Debug data was not generated.
*YES
Debug data was generated.
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.
10
No additional optimization is performed on the generated code. Variables can be displayed and changed when the program is being debugged. With no optimization of the code, this value provides the lowest level of module performance. 10 is also known as *NONE.
20
Some optimization is performed on the generated code. When the module optimized at this level is being debugged, the variables can be displayed but not changed. 20 is also known as *BASIC.
30
More optimization is performed in addition to those performed at optimization level 20. Variables cannot be changed but can be displayed while the program is being debugged. However, the displayed value of the variable during debugging may not be its actual value. 30 is also known as *FULL.
40
Maximum level of optimization. This level includes all the optimizations performed at optimization level 30. In addition, it includes optimization that disables call and instruction tracing. Thus, tracing of modules created at this optimization level cannot be done.
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.
*NO
Not all the creation data is present in the bound module.
*UNOBS
The creation data is present in the bound module but not all of that data is observable.
*YES
The creation data is present in the bound module and all of that data is observable.
TERASPACE_STORAGE_ENABLED TERASPACE VARCHAR(4) The teraspace storage capability for this bound module.
*NO
The module is not teraspace storage enabled.
*YES
The module is teraspace storage enabled.
STORAGE_MODEL STGMDL VARCHAR(10) Where the automatic and static storage for this bound module is allocated at run time.
*INHERIT
Automatic and static storage are allocated from either single-level storage or teraspace, depending on the activation.
*SNGLVL
Automatic and static storage are allocated from single-level storage.
*TERASPACE
Automatic and static storage are allocated from teraspace.
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.
*APYBLKORD
Block-order profiling data is applied to the module. See NUMBER_PROCEDURES_ BLOCK_REORDERED for the current number of procedures in this module that are block reordered.
*COL
The collection of profiling data is enabled. Any block-order profiling data has been removed for the module.
*NOCOL
The collection of profiling data is not enabled and block-order profiling data is not applied to the module.
ALLOW_RTVCLSRC RTVCLSRC VARCHAR(4) Whether the module has CL source data that can be retrieved from the program.
*NO
There is no CL source for this module.
*YES
There is CL source for this module.
USER_MODIFIED USER_MOD VARCHAR(4)
Nullable
Indicates whether the module was changed by the user at bind time.
*NO
The user did not change the module.
*YES
The user changed the module.

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:
*LOCAL
The module can only access data on the local system.

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.
*ALL
Read stability.
*CHG
Uncommitted read.
*CS
Cursor stability.
*NONE
No commit.
*RR
Repeatable read.

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.
*SQL
The SQL naming convention is used.
*SYS
The system naming convention is used.

Contains the null value if the module does not contain SQL statements.

SQL_DATE_FORMAT DATFMT VARCHAR(4)
Nullable
The date format attribute.
*DMY
Day/month/year format (dd/mm/yy).
*EUR
European format (dd.mm.yyyy).
*ISO
International Standards Organization format (yyyy-mm-dd).
*JIS
Japanese Industrial Standard format (yyyy-mm-dd).
*JUL
Julian format (yy/dds).
*MDY
Month/day/year format (mm/dd/yy).
*USA
USA format (mm/dd/yyyy).
*YMD
Year/month/day format (yy/mm/dd).

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.
*EUR
European format (hh.mm.ss).
*HMS
Hours/minutes/seconds format (hh:mm:ss).
*ISO
International Standards Organization format (hh.mm.ss).
*JIS
Japanese Industrial Standard format (hh.mm.ss).
*USA
USA format (hh:mm a.m. or p.m.).

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:
*CURLIB
The SQL sort sequence table is found by looking in the current library.
*LIBL
The SQL sort sequence table is found by looking in the library list.

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:
*HEX
No SQL sort sequence is used for the SQL statements.
*JOBRUN
The SQL sort sequence is the SRTSEQ value associated with the job at the time the SQL statements within the module are run.
*LANGIDSHR
The shared SQL sort sequence for the language identifier (LANGID) is used for the SQL statements.
*LANGIDUNQ
The unique SQL sort sequence for the language identifier (LANGID) is used for the SQL statements.

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:
*JOBRUN
The language identifier is the LANGID associated with the job at the time the module is run.

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:
*OWNER
Local dynamic SQL statements are run under the profile of the program or service program's owner. Distributed dynamic SQL statements are run under the profile of the SQL package's owner.
*USER
Local dynamic SQL statements are run under the profile of the job or thread. Distributed dynamic SQL statements are run under the profile of the application server job.

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.
*NO
A copy of the data is not allowed.
*OPTIMIZE
A copy of the data is allowed whenever it might result is better performance.
*YES
A copy of the data is allowed, but only when necessary.

Contains the null value if the module does not contain SQL statements.

SQL_CLOSE_SQL_CURSOR CLOSQLCSR VARCHAR(10)
Nullable
Specifies the CLOSQLCSR attribute.
*ENDACTGRP
SQL cursors are closed, SQL prepared statements are implicitly discarded, and LOCK TABLE locks are released when the activation group ends.
*ENDMOD
SQL cursors are closed and SQL prepared statements are implicitly discarded when the module is exited. LOCK TABLE locks are released when the first SQL program on the call stack ends.

Contains the null value if the module does not contain SQL statements.

SQL_DELAY_PREPARE DLYPRP VARCHAR(4)
Nullable
Indicates the delay prepare attribute.
*NO
Dynamic statement validation is performed when the dynamic statements are prepared.
*YES
Dynamic statement validation is delayed until the dynamic statements are used.

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.
*ALLREAD
Rows are blocked for read-only cursors.
*NONE
Rows are not blocked for retrieval of data for cursors.
*READ
Rows are blocked for read-only retrieval of data for cursors when:
  • The commitment control value is *NONE.
  • The cursor is declared with a FOR READ ONLY clause or there are no dynamic statements that could run a positioned UPDATE or DELETE statement for the cursor.

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:
*DUW
CONNECT (Type 2) semantics are used to support distributed unit of work.
*RUW
CONNECT (Type 1) semantics are used to support remote unit of work.

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;
End of change