Wednesday, January 3, 2024

Check if license product installed

I was performing some testing on a different IBM i partition where I wanted to take a spool file and generate a PDF in my IFS folder. I received an error saying that "Transformation services not loaded". Before I move my testing to another partition I wanted an easy way to check is "IBM Transformation Services for i" is installed.

I could check using the Work License Information, WRKLICINF, as the message suggested. But I my profile does not have sufficient authority to use it.

Fortunately there is an alternative I can use. I need to thank IBM Db2 for i chief architect, Scott Forstie, for bringing to my attention a SQL View that provides me with an easy to way to accomplish what I want.

SOFTWARE_PRODUCT_INFO View will return information about software products in your partition.

Before I give my example I recommend that you check the whole View, columns and rows, to see what is available:

01  SELECT * FROM QSYS2.SOFTWARE_PRODUCT_INFO

"IBM Transformation Services for i" is feature licensed product id 5770TS1. If I wanted to check if it is installed in a partition I can use the following statement:

01  SELECT PRODUCT_ID,PRODUCT_OPTION,INSTALLED
02    FROM QSYS2.SOFTWARE_PRODUCT_INFO
03   WHERE PRODUCT_ID = '5770TS1'

Line 1: To see if 5770TS1 is installed I just need to check three columns:

  • PRODUCT_ID:  License product id
  • PRODUCT_OPTION:  Product option
  • INSTALLED:  If this has been installed

Line 2: The View SOFTWARE_PRODUCT_INFO is in the library QSYS2.

Line 3: I only want the results where the Product id is 5770TS1.

My results are:

PRODUCT_ID  PRODUCT_OPTION  INSTALLED  LOAD_STATE
----------  --------------  ---------  ----------
5770TS1     *BASE           YES        90
5770TS1     *BASE           YES        90
5770TS1     1               YES        90

The load state of '90' confirms that the product was installed successfully.

Using the load state I can check if there are any products that were not successfully or completetly installed using the following:

01  SELECT PRODUCT_ID,PRODUCT_OPTION,INSTALLED,LOAD_STATE,
02         SUPPORTED,TEXT_DESCRIPTION
03    FROM QSYS2.SOFTWARE_PRODUCT_INFO
04   WHERE LOAD_STATE <> '90'

Line 2: I have added two columns to this statement that were not present in the last:

  • SUPPORTED:  Whether this product load is currently supported
  • TEST_DESCRIPTION:  Description for the product id

Line 4: Return anything where the load state is not successful.

There is one product that is not successfully installed:

PRODUCT_ID PRODUCT_OPTION INSTALLED LOAD_STATE SUPPORTED
---------- -------------- --------- ---------- ---------
5770JS1    *BASE          YES       64         NO


TEXT_DESCRIPTION
--------------------------------
IBM Advanced Job Scheduler for i

Full descriptions for the different load states can be found in the IBM documentation, see link below.

Code '64' means that there was an object missing when the RSTLICPGM command was used.

I was able to get the information I needed from this View to be able to continue my testing on a partition with the required licensed product.

 

This article was written for IBM i 7.5, and should work for some earlier releases too.

2 comments:

  1. A typo error in your article. The command name is WRKLICINF (not WRKLICINFO)

    ReplyDelete
    Replies
    1. Thank you for bringing that to my attention. The correction has been made.

      Delete

To prevent "comment spam" all comments are moderated.
Learn about this website's comments policy here.

Some people have reported that they cannot post a comment using certain computers and browsers. If this is you feel free to use the Contact Form to send me the comment and I will post it for you, please include the title of the post so I know which one to post the comment to.