× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Simon,

I am not currently using the Request License and Release License APIs. Since I was originally creating a temporary demo license at product installation time, I have been using the Retrieve License Information (QLZARTV) API and checking the returned license expiration date versus the current date myself. I looks like the QLZARTV API does not update the usage counts for the grace period, so the product license will always be valid using my current method and the grace period.

I will look at changing the license check process to be one of Request License (QLZAREQ) and Release License (QLZARLS) instead of just checking the expiration date of the license. Then again, I may go back to creating the demo license in the post install exit program and product installation time, then deleting the license creation programs from the product library. What happens if there is a job blowup (not with my code of course ;)) and I don't get a chance to release the license? Would it be released automatically at signoff time or would it stay active for the license?

By the way, do you have a good source for more details about how the Software Product APIs work besides the API manual and possibly the System Manager Use manual, or is it just the School of Hard Knocks?

Thanks for the help.

At 10:17 PM 1/6/2007, Simon Coulter wrote:
> At Simon Coulters suggestion, I tried creating my product with a
> grace period instead of generating a 30 day license key at RSTLICPGM
> time.   The problem I am having with this is recognizing when the
> grace period is over (under my old way, I would send a "Trial expires
> in nnn days" message).

You can still do this by catching the "Grace period expired" messages
and sending your own message instead. The two you care about are
CPF9E70 and CPF9E71. Both of these indicate the grace period has
expired.

You might also care about CPF9E17.

CPF9E72 indicates a grace-period licence has been issued.

> Using the grace period method, the day I installed the product,
> QLZARTV (Retrieve License Information) was returning a Grace Period
 ...snip...
> would tell me how much time is left on the Grace Period or that there
> would be some kind of message, but I didn't see anything.

Grace period starts from the date of first USE, not date of install.
The product can be installed but unused and the grace period will not
expire and therefore will not be set. Did you actually use the product
before checking the grace period information?

> QLZADDLI (Add License Key) parms are set as follows:
>
> D LicenseInfoDS   DS
> D  UsageType                     2    Inz('01')
 ...snip...
> Inz(30)                              Grace period days
> D  AllowGracePer                 1    Inz('1')
>     Yes

Looks OK for a quick check.

> License Key information returned by QLZERTV API  on the day the
> product was installed is as follows:
>
> BYTESRETURNED OF LICKEYINFO = 87
 ...snip...
> EXPIREYMD OF LICKEYINFO = '999999
> VENDORDATA OF LICKEYINFO = '        '
> PRDLICHANDLE OF LICKEYINFO = 'xxxxxxxxxxxxxxxx'

This shows Usage Count of 0 meaning not currently in use, and it shows
Peak Usage of 0 meaning never used.

API documentation says that Grace Expires of 999999 means no grace
period or the grace period has expired. I've never noticed what this
shows immediately after and install but I do know that it shows the
actual expiry date even after expiration has been reached so I think
the documentation is wrong on this point.

I can't remember what you'll see for Expire Date after an initial
installation. I think it should be 999999 because and expiry date for a
licence key hasn't been set because no key has yet been added. You're
expecting the grace period to cover evaluation use.

The rest of these values seem to be what I would expect except for
Usage Limit which is *NOMAX. This suggests you've added a licence key
with Usage of *NOMAX and no expiry date. If so, that will defeat the
point of the grace period (although it doesn't explain why Peak Usage
is zero).

Use WRKLICINF and compare the values it shows with what you expect from
the QLZADDLI API (and QLZAADDK API or ADDLICKEY command if you used one
of them).

> Shouldn't I be able to tell when the grace period expires from the
> license APIs or do I just have to wait until the system figures out
> that the Grace Period has expires and shuts off the usage of the
> product?

Yes, you should be able to tell but the licence manager won't set the
expiry date until the default usage limit has been exceeded. Your
default usage is *ZERO so this suggests that:
        1) The product has only been installed and never actually used
        2) The product does not properly request a licence when it runs or
does not successfully get a licence (and doesn't handle the error)
which is why the usage count is 0.

> I would have thought that since I have a Default Usage
> Limit of Zero, that the Grace period count down would start the first
> time I used the product.

That's how it should work and I've successfully used a 30-day grace
period with all three licence models (*CONCURRENT, *REGISTERED, and
*PROCESSOR). Like you, I only use *KEYED compliance and I've never
bothered with *OPRACTION or *WARNING.

Dave Murvin
DRM Enterprises, Inc.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.