EXPLAIN PACKAGE Command

This section introduces the EXPLAIN PACKAGE command.

When a package is explained, you can specify the collection ID, the package name, or both, as generic names using an asterisk (*) as a wildcard character. For example, you have the following options:
EXPLAIN PACKAGE (DSNAPC1.COLLECT.MYT*)
EXPLAIN PACKAGE (DSNAPC1.COLLECT.MYTEST)

If a wildcard character is used, OMEGAMON for DB2® Performance Expert explain counts the total number of SQL statements that belong to the packages (the total number of SQL statements also includes non-explainable statements).

If the number of packages is more than one, and the total number of SQL statements in these packages is larger than 300, OMEGAMON for Db2 Performance Expert explain does not explain any SQL statements unless the FORCE(YES) option is specified.

If the package specification does not contain any wildcard character, the total number of SQL statements is less than 300, or only one package conforms to the specification, the SQL statements are explained. However, if the package exists in more than one version, only the most recent version is explained. In this case a report showing all the versions for that package is produced.

For example, the following command was used to produce the report shown in Explain Report - Package Version List Block:
EXPLAIN PACKAGE (DSNAPC1.COLLECT.MYTEST.(-7)) GEN(3)

For details on how to specify EXPLAIN commands refer to the Report Command Reference.

Explain Report - Package Version List Block

Here is an example of the Explain report for the Package Version List block:
ACTUAL AT: 01/30/16 13:10:38 OMEGAMON XE for DB2 PE (V5.4)PAGE       : 1-1  
                                  EXPLAIN PACKAGE         DB2 VERSION: V10      
LOCATION : DSNAPC1                                        USER AUTHID: XRK      
SUBSYSTEM: APC1                       SUMMARY             CURR.SQLID : XRK      



FPEY0166I  PACKAGE MYTEST IN COLLECTION COLLECT HAS THE FOLLOWING VERSIONS

PRE-COMP'D EXP GEN  VERSION IDENTIFICATION
---------- --- ---- -----------------------
2015-08-24 YES    0 VERSION0
2015-08-23 YES  -01 VERSION1
2015-08-22 YES  -02 VERSION2
2015-08-21 YES  -03 VERSION3
2015-08-20 YES  -04 VERSION4
2015-08-19 YES  -05 VERSION5
2015-08-18 YES  -06 VERSION6
2015-08-17 YES  -07*VERSION7IDENT
2015-08-16 YES  -08 VERSION8
2015-08-15 YES  -09 VERSION9
2015-08-14 YES  -10 < VERSION IDENTIFICATION NOT SPECIFIED >
2015-08-13 YES  -11 VERSION11
2015-08-12 YES  -12 VERSION12
2015-08-11 YES  -13 VERSION13
2015-08-10 YES  -14 VERSION14
2015-08-09 YES  -15 VERSION15
2015-08-08 YES  -16 VERSION16
2015-08-07 YES  -17 VERSION17
2015-08-06 YES  -18 VERSION18
2015-08-05 YES  -19 VERSION19
2015-08-04 YES  -20 VERSION20

START VERSION GENERATION NUMBER SPECIFIED:  -7
NUMBER OF VERSION GENERATIONS REQUESTED:     3
This report shows that the package exists in 21 versions, where the version that corresponds to generation number -7 was selected for explanation. The report further shows that the user asked for the explanation of three generations (-7, -8, and -9). The first generation to be explained is marked with an asterisk (*). Instead of specifying a generation ID, the version ID could be specified. The version ID can be specified either in full or in combination with a wildcard character as in the following example:
EXPLAIN PACKAGE(DSNAPC1.COLLECT.MYTEST.(VERSION7*))  GEN(3)

A maximum of 100 generations are listed.