Generate License Key (QLZAGENK) API


  Required Parameter Group:


  Default Public Authority: *EXCLUDE

  Threadsafe: No

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

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 created. The repository can be queried to see what keys were generated for such things as a specific product, system, and so on. For more information about the license repository, see Retrieve License Key Information (QLZARTVK) API.


Authorities and Locks

API QLZAGENK Authority
*PUBLIC(*EXCLUDE)

Required Parameter Group

Product identification
INPUT; CHAR(*)

Information that uniquely identifies the product or feature for which the license key is being generated. The structure of this information is determined by the name of the format. For more information, see LICT0100 Format.

Product identification format name
INPUT; CHAR(8)

The name of the format containing the information to identify the product.

The format name is:


License key input
INPUT; CHAR(*)

Information that is used to generate a unique license key for the product. The structure of this information is determined by the name of the format. For more information, see LICC0100 Format.

License key input format name
INPUT; CHAR(8)

The name of the format containing the input for generating the license key.

The format name is:


License key output
OUTPUT; CHAR(*)

Information about the license key generated. The structure of this information is determined by the name of the format. For more information, see LICK0100 Format.

Length of license key output
INPUT; BIN(4)

The length of the license key output parameter.

License key output format name
INPUT; CHAR(8)

The name of the format containing the output for the generated license key.

The format name is:


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


LICT0100 Format

The following information uniquely describes the product or feature for which the license information is to be added. For detailed descriptions of the fields, see Field Descriptions.



LICC0100 Format

The following specifies the format for the license key information used to generate the license key for the product. All fields must be specified. For detailed descriptions of the fields, see Field Descriptions.



LICK0100 Format

The following specifies the format for the license key generated by this product. For detailed descriptions of the fields, see Field Descriptions.



Field Descriptions

Bytes available. The number of bytes of data available to be returned. All available data is returned if enough space is provided.

Bytes returned. The number of bytes of data returned.

Expiration date. The date the product license will expire. After this date, the usage limit is set to the default usage limit. No user over the usage limit is allowed to access the product or feature. A new license key must be obtained from the software provider to allow further use of the product.

Feature. The feature of the product to which the license key is being generated. Valid values for the feature are 5001 through 9999.

Generation date and time. The date and time that the license key was generated in the CYYMMDDHHmmSS format as follows:

License key. The license key generated for the product. The key will be made up of characters A-F and numbers 0-9.

License term. The extent of time the authorized usage limit for a product lasts. Each time a new license term is installed for a product, the authorized usage limit must be set by:

Possible values are:

Start of change

Where the x and y can be a number from 0 through 9. Z can be a number 0 through 9 or a letter A through Z.

Where vv are any numeric characters 00 through 35 representing the version of the product, rr are any numeric characters 00 through 35 representing the release of the product, and mm can be 00 through 09 or 0A through 0Z representing the modification of the product.

End of change

Processor group. The processor group of the system the product or feature will be installed on. This field is left justified.

Product ID. The product ID of the product or feature to which the license information is being added.

Serial number. The serial number of the system the license key will be installed on.

Size of license key input structure. The size, in bytes, of the license key input structure contained in format LICC0100.

Usage limit. The usage limit that will be in effect when the product or feature is initially installed.

Vendor data. An 8 character field for vendor defined usage.

Vendor password. The software vendor's password. This password is encrypted and stored with the product. It is used in validating this Generate License Key request. It must also be the same password used when adding product license information (ADDPRDLICI command or QLZADDLI API) to this product or feature. The password must begin with an alphabetic character (A through Z, $, #, or @). This character must be followed by no more than 9 alphameric characters (A through Z, 0 through 9, $, #, @, or _).


Error Messages



API introduced: V3R1

[ Back to top | Software Product APIs | APIs by category ]