Search code examples
ibm-midrangejt400

JT400 getUsageCount without requesting license


In the documentation it explicitly states that you must request a license to get the usage count of the licenses.

getUsageCount ()

Returns the usage count for this license. The count returned is the number of licenses that are in use on the system for that product ID, feature, and release when this license was requested. A license must have been requested prior to calling this method.

Is there a way to "getUsageCount()" without requesting a license through another class or object?

I couldn't find such a way, but I assume it must exist, because you can read this information through a terminal without requiring one. If it exists in a table then that would also be an acceptable alternative.


Solution

  • Not that I see.

    You'd need to use ProductList.getProducts to return an array of Products then you could get the details for each product in the list.

    Not really any different than using WRKLICINF, and needing to use 5=Display detail on a 5250 screen.