Generate License Key (GENLICKEY)

The Generate License Key (GENLICKEY) command generates a license key to enable users to access a product or a feature of a product. This key is specific to the product and system information entered in this command. The resulting key will be a combination of 18 characters and numbers, A-F and 0-9. To run this command, the product definition of the product you are generating the key for must exist on the system.

Start of change

This command also adds the license information to the license repository. The keys are saved in the repository to keep a history of all the keys generated. You can display the repository to see what keys were generated for a specific product or system. To work with the license repository, you can use the Display License Key Information (DSPLICKEY), Add License Key Information (ADDLICKEY), and Remove License Key Information (RMVLICKEY) commands.End of change

Start of change

You can use the Add License Key Information (QLZAADDK) API or the Add Product License Information (QLZADDLI) API to add license information.End of change

Start of change

Restrictions:End of change

Start of changeEnd of change

Parameters

Keyword Description Choices Notes
PRDID Product ID Character value Required, Positional 1
LICTRM License term Character value Required, Positional 2
FEATURE Feature Character value Required, Positional 3
VNDPWD Vendor password Simple name, *NONE Required, Positional 4
SERIAL System serial number Character value Required, Positional 5
PRCGRP Processor group Character value, *ANY Optional, Positional 6
EXPDATE Expiration date Date, *NONE Optional
USGLMT Usage limit 0-999999, 1, *NOMAX Optional
VNDDTA Vendor data Character value, *NONE Optional
OUTPUT Output *, *PRINT, *LICKEYFILE Optional
LICKEYFILE License key file Qualified object name Optional
Qualifier 1: License key file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
LICKEYMBR License key member Element list Optional
Start of changeElement 1: Member to receive outputEnd of change Name, *FIRST
Element 2: Replace or add records *ADD, *REPLACE

Product ID (PRDID)

Start of change

Specifies the 7-character identifier of the product for which the license key is to be generated.End of change

License term (LICTRM)

Specifies the license term for which license key is to be generated.

The possible values are:

license-term
Start of change
Specify the license term of the product in one of the following two formats:

Specify the license term in Vx, VxRy, or VxRyMz format, where x and y can be a number from 0 through 9, and z can be a number 0 through 9 or a letter A through Z.End of change

Start of change

Specify the license term in vv, vvrr, or vvrrmm format, where vv and rr can be a number from 00 through 35, and mm can be a number 00 through 09 or a letter 0A through 0Z. This format must be used if the version or release of the product is greater than 9.

End of change

Feature (FEATURE)

Specifies the feature of the product specified on the PRDID parameter for which the license key is to be generated.

The possible values are:

feature
Start of change
Specify the feature for which a license key is to be generated. Valid values range from 5001 through 9999.End of change

Vendor password (VNDPWD)

Specifies the software vendor's password. This password will be encrypted and stored with the product. It is used to validate the generate license key request and must be the same password you use on the Add Product License Information (ADDPRDLICI) command.

The possible values are:

*NONE
There is no vendor password needed to generate a license key.
vendor-password
Specify the vendor password. It must begin with an alphabetic character (A through Z, $, #, or @) followed by no more than 9 alphanumeric characters (A through Z, 0 through 9, $, #, @, or _).

System serial number (SERIAL)

Specify the system serial number of the system the license key is being generated for.

The possible values are:

system-serial-number
Specifies the system serial number of the system the license key is being generated for.

Processor group (PRCGRP)

Specifies the processor group of the system the license key is being generated for.

The possible values are:

*ANY
The license key being generated will work with any processor group.
processor-group
Specifies the processor group of the system the license key is being generated for. Use the Work with License Information (WRKLICINF) command on the system the key is being generated for to display the processor group.

Expiration date (EXPDATE)

Specifies the date the product license expires. After this date, users over the default usage limit will not be allowed to access the product or feature. A new license key must be obtained from the software vendor to allow further use of the product.

The possible values are:

*NONE
There is no expiration date for the product or feature.
expiration-date
Specify the date that the product or feature expires.

Usage limit (USGLMT)

Start of change

Specifies the maximum number of users (usage limit) for the product or feature for which the license key is being generated. For concurrent usage, specifies the maximum number of jobs allowed to access the product or feature at the same time. For registered usage, this is the maximum number of license users that can be registered to use this product or feature.End of change

The possible values are:

1
One user is allowed to access the product or feature.
*NOMAX
The number of users is not limited.
usage-limit
Specifies the maximum number of users for this product or feature. Valid values range from 0 through 999999.

Vendor data (VNDDTA)

Specifies an 8-character data field to be defined and used by the vendor.

The possible values are:

*NONE
There is no vendor data for this product or feature.
vendor-data
Specifies 8-characters that help define further information on the product or feature.

Output (OUTPUT)

Specifies whether the license key that is generated is displayed in a completion message, printed in a spooled file, or saved in a file.

The possible values are:

*
The license key is only shown in a completion message.
*PRINT
The license key is printed in a spooled file.
*LICKEYFILE
Start of change
The license key information is saved to the file specified on the LICKEYFILE parameter. This file can then be used as a key file for Distributed Systems License Option (DSLO) media.End of change

License key file (LICKEYFILE)

Start of change

Specifies the file in which the license key information is saved. If this file does not exist, the system creates it. If a new file is created, system file QALZAKEY in system library QSYS with a format name of LZAKEYR is used as a model.End of change

The possible values are:

*LIBL
The library list is used to locate the file in which to save the license key.
*CURLIB
The current job library is used to locate the file in which to save the license key. If no library is specified as the current library, the QGPL library is used.
library-name
Specify the name of the library where the license key is to be saved.

The possible file name value is:

file-name
Specify the name of the file into which the license key information is to be saved.

License key member (LICKEYMBR)

Specifies which member the license key information is saved into and how the information is saved.

Note:

Start of change

You can also use the Generate License Key (QLZAGENK) API to create the license key information.End of change

The possible member to receive output values are:

*FIRST
The first member in the file receives the output. If LICKEYMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified on the LICKEYFILE parameter.
member-name
Start of change
Specify the name of the file member that receives the output. If the name of the file member is specified and the member does not exist, the system creates it. If the member already exists, you have the option of either adding a new record to the end of the existing member or clearing the member and then adding the new records.End of change

The option to perform on member values are:

*ADD
If the member exists, the system adds the new record to the end of the existing records.
*REPLACE
If the member exists, the system clears it and then adds the new record.

Examples

Start of changeGENLICKEY   PRDID(1MYPROD)  LICTRM(V1R2M0)  FEATURE(5001)End of change
            VNDPWD(PRODUCTPWD)  EXPDATE(*NONE)
            SERIAL(1234567)  PRCGRP(P30)  USGLMT(25)

Start of change

This command generates a license key for product 1MYPROD, license term V1R2M0 and feature 5001. The key allows 25 users to be authorized to use this product, and there is no expiration date. The key allows the product to only be used on a system with a serial number of 1234567 and a processor group of P30 or less.End of change

Error messages

Start of change

*ESCAPE MessagesEnd of change

Start of change
CPF9860
Error occurred during output file processing.
CPF9899
Error occurred during processing of command.
End of change