× 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.




On 07/01/2007, at 9:50 AM, Dave Murvin 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
Expires date of 9999999 and a licence key expiration date of
9999999.  I tried this again on the following day and the Grace
Period Expires date was still 9999999.  I think the license key
expiration date was also 9999999, but do not have a print screen and
I have since created a product license which fills in the license key
expiration date.  I would have thought that at least one of the dates
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')
      Concurrent limit
D  Compliance                    2    Inz('03')
      Must have key
D  DftUsageLimit                10I 0
Inz(*Zero)                           Allowed days w/o key
D  LicenseTerm                   1    Inz('2')
      Entire Release
D  AllowLicRel                   1    Inz('0')
      Can't be released
D  VendorPasswrd                10    Inz('xxxxxxxxxxxxxxxxx')
      Same for keys!!!
D  GracePeriod                  10I 0
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
BYTESAVAIL OF LICKEYINFO = 142
USAGELIMIT OF LICKEYINFO = -1
USAGECOUNT OF LICKEYINFO = 0
USAGETYPE OF LICKEYINFO = '01'
COMPLIANCETYP OF LICKEYINFO = '03'
LICENSETERM OF LICKEYINFO = 'V2R1  '
LKIRELEASELVL OF LICKEYINFO = 'V2R1M0
THRESHOLDVAL OF LICKEYINFO = -1
GRACEPERIOD OF LICKEYINFO = 30
GRACEEXPIRES OF LICKEYINFO = '9999999
PROCESSORGRP OF LICKEYINFO = 'P05'
LKIRESERVED OF LICKEYINFO = '  '
PEAKUSAGE OF LICKEYINFO = 0
EXPIRECENTURY OF LICKEYINFO = '9
EXPIREDATE OF LICKEYINFO = '9999999
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.

Regards,
Simon Coulter.
--------------------------------------------------------------------
   FlyByNight Software         AS/400 Technical Specialists

   http://www.flybynight.com.au/
   Phone: +61 3 9419 0175   Mobile: +61 0411 091 400        /"\
   Fax:   +61 3 9419 0175                                   \ /
                                                             X
                 ASCII Ribbon campaign against HTML E-Mail  / \
--------------------------------------------------------------------



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.