![Start of change](./delta.gif)
CHECK_PRODUCT_OPTIONS table function
The CHECK_PRODUCT_OPTIONS table function reports differences between the correct structure and the actual structure of all installed software products.
This service combines the QSYS2.SOFTWARE_PRODUCT_INFO view and the Check Product Option (CHKPRDOPT) CL command to check all the installed products and options on the system.
Authorization: See Note below.
- check-signature
- An expression that indicates whether the digital signatures of objects are to be checked.
- *ALL
- All objects that can be digitally signed will have the signature verified. Any object that can be signed but has no signature will be identified in a message but the product will not be set to be in error. Any signed object with a signature that is not valid will be identified in a message. If an invalid signature is found, the product will be set to be in an erroneous state.
- *NONE
- Digital signatures of objects will not be checked.
- *SIGNED
- Objects with digital signatures are checked. Any object that has been signed will have the signature verified. Objects with invalid signatures will be identified in a message and the product will be set to be in an erroneous state. This is the default.
The result of the function is a table containing multiple rows with the format shown in the following table. All the columns are nullable.
Column Name | Data Type | Description |
---|---|---|
PRODUCT_ID | VARCHAR(7) | The product ID. |
PRODUCT_OPTION | VARCHAR(5) | The product option of the product. Can contain the
following special value:
|
LOAD_ID | VARCHAR(4) | The load ID of the product load . |
RELEASE_LEVEL | VARCHAR(10) | The release level of the product. |
CHECK_SUCCESSFUL | VARCHAR(3) | Whether the check was successful.
|
FAILURE_MESSAGE_ID | CHAR(7) | The message ID of the failure when CHECK_SUCCESSFUL
has a value of NO. Examine the job log for additional message details. The CL command listed in the CHKPRDOPT_COMMAND column can be used to run the check again. Contains the null value if CHECK_SUCCESSFUL is YES. |
FAILURE_MESSAGE_TEXT | VARGRAPHIC(1024) CCSID 1200
|
The message text for the failure when
CHECK_SUCCESSFUL has a value of NO. Contains the null value if CHECK_SUCCESSFUL is YES. |
CHKPRDOPT_COMMAND | VARCHAR(1000) | The CL command string used to check this product option. |
Note
This function is provided in the SYSTOOLS schema as an example of how to return information that has been written to the joblog. Similar to other Db2® for i provided tools within SYSTOOLS, the SQL source can be extracted and used as a model for building similar helper functions, or to create a customized version within a user-specified schema.
Services provided in SYSTOOLS have authorization requirements that are determined by the interfaces used to implement the service. To understand the authority requirements, extract the SQL for the service and examine the implementation.
Example
- List any potential problems with all installed software
products.
SELECT * FROM TABLE(SYSTOOLS.CHECK_PRODUCT_OPTIONS( ));
![End of change](./deltaend.gif)