Retrieve Product Information (QSZRTVPR) API


  Required Parameter Group:


  Optional Parameter:


  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Product Information (QSZRTVPR) API returns information about a software product. The information is requested by specifying a product ID, release level, option number, and load ID; not by specifying an object name. The Display Software Resources (DSPSFWRSC) command and the Select Product (QSZSLTPR) API will obtain a list of installed products about which you can retrieve information.

You can use this API to:

Note: The Retrieve Object Description (QUSROBJD) API can be used to retrieve product information from the object description of an object. The product ID and release level from the object description is returned by QUSROBJD in format OBJD0300.


Authorities and Locks

Product Availability Authority
None

Product Availability Lock
*SHRRD

The product availability object resides in the QUSRSYS library.

Product Definition Authority
None

Product Load Authority
None

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The variable to receive the requested information.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable in bytes. The value specified must be at least 8.

Format name
INPUT; CHAR(8)

The content and format of the information returned.

The possible format names are:


Product information
INPUT; CHAR(*)

The structure that contains values for which product information is to be retrieved. The structure provided depends on which product information format is requested. For more information, see Product Information Format.

Error code
I/O; CHAR(*)

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


Optional Parameter

Product information format name
INPUT; CHAR(8)

The content and format of the product information parameter.

The possible format names follow:


Product Information Format

Information passed in the product information parameter can be in one of the following formats. For detailed descriptions of each field, see Field Descriptions.


PRDI0100 Format



PRDI0200 Format



Field Descriptions

CCSID for returned directory or software agreement document names. When PRDR0800 format is specified, this is the CCSID in which the directory names should be returned. When PRDR0900 format is specified, this is the CCSID in which software agreement document names should be returned. If this field is zero or 65535, the directory or software agreement document names are returned in the job default CCSID.

Length of product information parameter. The total number of bytes specified on the product information parameter. The value specified must be from 36 through 256.

Load ID. The load ID for which information is being requested. Load IDs are 4 characters in length; for example, 2924 is the load ID for an English national language version (NLV).

You can use this special value for the load ID:

Product ID. The product ID for which information is being requested.

You can use this special value for the product ID:

Product option. The option number for which information is being requested. Use 0000 for the base option. Valid values are 0000 through 0099, where each character is a digit.

Release level. The version, release, and modification level of the product.

The release level can be passed as one of the following formats:

Reserved. This field must contain hexadecimal zeros.


Format of the Returned Information

Information returned in the receiver variable parameter can be in one of the following formats. For detailed descriptions of the fields for each format, see Field Descriptions.


PRDR0100 Format

If the product load is not known to the system, an error (CPF0C1F) will occur.



PRDR0200 Format

If the *PRDLOD object does not exist, an error (CPF0C1F) will occur.

The fields following the library records field define that array. The number of entries in the array is the number of primary libraries for this load.



PRDR0300 Format

If the *PRDLOD object does not exist, an error (CPF0C1F) will occur.

The fields following the folder records field define an entry in that array. The number of entries in the array is the number of primary folders for this load.



PRDR0400 Format

If the product load has not been packaged, an error (CPF0C1F) will occur. There may have been PTF activity for this product load. If so, this list might not contain all the objects that would be saved by the Save Licensed Program (SAVLICPGM) command. Error CPF0C1B is returned if this format is requested for the base option of the operating system.

The fields following the object records field define an entry in that array. The number of entries in the array is the number of objects packaged for this load.



PRDR0500 Format

If the product definition for the specified product ID and release level does not exist, an error (CPF0C1F) will occur. Error CPF0C1B is returned if this format is requested without specifying product option 0000 and load ID *CODE. Product option 0000 must be specified for this format even though the information returned is then for all options.

The fields following the option records field define an entry in that array. The number of entries in the array is the number of product options for this product and release.



PRDR0600 Format

Error CPF0C1F occurs if the product definition does not exist. Error CPF0C1B is returned if this format is requested without specifying product option 0000 and load ID *CODE.

The fields following the load records field define an entry in that array. The number of entries in the array is the number of loads for this product and release.



PRDR0700 Format

When this format is requested, valid values for the release level field are all release levels for which the operating system was made available through the currently installed release level of the operating system.

If the release level field is not a valid value, an error (CPF0C1C) will occur. Error CPF0C1B is returned if this format is requested without specifying the product option as 0000, product ID as *OPSYS, and load ID as *CODE.



PRDR0800 Format

If the *PRDLOD object does not exist, an error (CPF0C1F) will occur.

The product home directory is a grouping mechanism. It is designed to be the parent directory for several product directory paths. The directory information array will contain an entry for each primary full path for the load. This entry will have offsets to the primary and installed path names and the public object authorities for the directory.

All offsets within this structure will be set to 0 when the offset would be beyond the end of the receiver variable.

The following information is included to help clarify the use of format PRDR0800.

The primary full path being used in this example is /QSom/Class. The primary product home directory portion of this path is /QSom. The product directory is Class. These three pieces of information are returned as character array /QSom/Class.

For example, if /QSom/Class were 1000 bytes from the beginning of the receiver variable, the offset to primary full path name field would be 1000. To find the primary product home directory name, an offset of 1000 would be used as well. The length of primary full path name field would be 11. The length of primary product home directory name field would be 5. The offset to primary product directory name field would be 1006. The length of the primary product directory name would be: the length of primary full path name field plus the offset to primary full path name field minus the offset to primary product directory name field (11 + 1000 - 1006 = 5 bytes).

Each product directory associated with a product load will have a directory information array entry. This directory information array entry contains the information to access the different parts of the character string explained above.



PRDR0900 Format

If the *PRDLOD object does not exist, an error (CPF0C1F) will occur.

The software agreement document names list will contain an entry for each software agreement document name that is associated with this product load. Each entry will include the document name only. Entries will not include the full Integrated File System (IFS) path name. Entries will not include a translated language suffix.

Software agreement documents will be stored in a subdirectory of the software agreement repository. For IBM® packaged product loads this repository is /QIBM/ProdData/LicenseDoc/. For non-IBM packaged product loads this repository is /QIBM/UserData/LicenseDoc/. Refer to the QSRCRTPL API for more information regarding the location of software agreement documents.

All offsets within this structure will be set to 0 when the offset would be beyond the end of the receiver variable.



Field Descriptions

Allow dynamic naming. Whether the names of product libraries and root folders for this product option can be dynamically changed without causing a product error.

Possible values are:

Allow multiple releases. Whether this product can be installed at a release level different from the current release level without installing over the current release.

Possible values are:

Allow mixed releases. Whether this product allows mixed releases between its *BASE and options.

Possible values are:

Bytes available. The number of bytes of data available to be returned to the user.

Bytes returned. The number of bytes returned to the user. This is the lesser of the number of bytes available and the length of the receiver variable.

CCSID of returned directories. The value of the CCSID in which the directories were returned. This will be the requested CCSID if the error indicator on CCSID conversion field is 0.

CCSID of returned software agreement document names. The value of the CCSID in which the software agreement document names were returned. This will be the requested CCSID if the error indicator on the CCSID conversion field is 0.

Copyright current year. The value specified for the copyright current year when the product definition for this product load was created. If no copyright current year was specified when the product definition was created, the copyright current year is blank.

Copyright first year. The value specified for the copyright first year when the product definition for this product load was created. If no copyright first year was specified when the product definition was created, the copyright first year is blank.

Directory information array. An array that contains an element for each primary full path. The length of an element is specified by length of one directory information entry. The number of elements is the number of primary full paths.

Error indicator on CCSID conversion. Whether the CCSID conversion to the requested CCSID was successful. If the requested CCSID conversion fails, the CCSID in which the entry names are returned is identified in either the CCSID of returned directories names field or the CCSID of returned software agreement document names field depending on which format was specified.

Possible values follow:

Folder records. An array in which each entry includes the primary folder, installed folder, and reserved fields.

Installed folder. This can be one of the following:

Installed full path name. The installed full path name for the associated primary full path. It contains a directory name in the CCSID that is indicated in the CCSID of returned directories field. The installed full path contains the installed product home directory concatenated with a slash (/), which is concatenated with the installed product directory name. The length of the product directory is the length of the installed full path plus the offset to the installed full path minus the offset to the installed product directory name.

Installed library name. For a library record, this can be one of the following:

For an object record, the name of the library where the object should exist. The object might not exist in this library if the object had been deleted, or the library had been renamed.

Length of installed full path name. The number of bytes in this installed full path name.

Length of installed product home directory name. The number of bytes in the installed product home directory.

Length of one directory information entry. The number of bytes in each directory information array entry.

Length of one folder record. The number of bytes in each folder record.

Length of one load record. The number of bytes in each load record.

Length of one object record. The number of bytes in each object record.

Length of one option record. The number of bytes in each option record.

Length of primary full path name. The number of bytes in this primary full path name.

Length of primary product home directory name. The number of bytes in the primary product home directory.

Length of software agreement document name. The number of bytes in this software agreement document name. This will always be smaller than the length of one software agreement document name record.

Length of one software agreement document name record. The number of bytes for each software agreement document name record.

Level. The level identifier of the product for which information was returned. The format is Lxx. The returned value is blank for all products other than the operating system and Licensed Internal Code.

Library authority. The public authority given to the library by the Restore Licensed Program (RSTLICPGM) command when this load is installed if the library does not exist. This field will be blank if the product load has not been successfully packaged.

Possible values are:

Library create authority. The create authority set for this library by the Restore Licensed Program (RSTLICPGM) command when this load is installed if the library does not exist. This field will be blank if the product load has not been successfully packaged.

Possible values are:

Library records. An array in which each entry includes the following fields:

Library type. The type of library created by the Restore Licensed Program (RSTLICPGM) command when this load is installed if the library does not exist. This field will be blank if the product load has not been successfully packaged.

Possible values are:

Load error indicator. Whether there is a known error for this load.

The possible values are:

Load ID. The load ID of the product load for which information was returned. For the load records, the load ID field returns the load IDs that have been specified when the product definition was created.

Load records. An array for which each entry includes the product option, load ID, and a reserved field.

Load state. The state of the load for which information was returned.

The possible values are:

Load type. The type of load for which information was returned.

The possible values are:

Message file library name. The name of the library for the message file that contains the messages describing the product and its options.

Message file object name. The name of the message file that contains the messages describing the product and its options.

Minimum target release. The minimum release of the operating system to which the Save Licensed Program (SAVLICPGM) command will allow the product to be saved. The format must be in the format VxRyMz. Valid values for x and y are 0 through 9. Valid values for z are 0 through 9 and A through Z.

Minimum required VRM of option. The minimum release level that is allowed for the option that will run with the current level of the *BASE option for the product. This field is only applicable if mixed releases are allowed.

The possible values are:

Minimum VRM of *BASE required by option. The minimum release level that is allowed for the *BASE option that will run with the current level of the option for the product. This field is only applicable if mixed releases are allowed and for a load type of *CODE.

The possible values are:

Number of load records. The number of loads for this product option. The receiver variable may not have been large enough to hold all the load records. If this happens, this number may be larger than the number of load records actually returned.

Number of objects. The number of packaged objects for this load. The receiver variable may not have been large enough to hold all the objects. If this happens, this number may be larger than the number of objects actually returned.

Number of option records. The number of options for this product and release level. The receiver variable may not have been large enough to hold all the option records. If this happens, this number may be larger than the number of option records actually returned.

Number of preoperation exit program names. The number of preoperation exit programs for this load for this primary library. If there are no preoperation exit programs for this library, this will be 0.

Number of primary folders. The number of primary folders for this load. The receiver variable may not have been large enough to hold all the folder records. If this happens, this number may be larger than the number of folder records actually returned.

Number of primary full paths. The number of full paths for this load. The receiver variable may not have been large enough to hold all the directory information. If this happens, this number may be larger than the number of directories actually returned.

Number of primary libraries. The number of primary libraries for this load. The receiver variable may not have been large enough to hold all the library information. If this happens, this number may be larger than the number of libraries actually returned. The first record contains the principal primary library information. Subsequent records contain the information for the additional libraries, if the load has any additional libraries.

Number of public object authorities available. The number of public object authorities associated with a product directory. This will be set to 0 if the product load has not been successfully packaged.

Number of releases returned. The number of release levels returned for format PRDR0700.

Number of software agreement document names available. The number of software agreement documents for this load. The receiver variable may not have been large enough to hold all the software agreement document names. If this happens, this number may be larger than the number of software agreement document name records actually returned.

Number of software agreement document names returned. The number of software agreement document name records that were returned to the user. This is the lesser of the number of software agreement document names available and the number of software agreement document name records that the reciever variable could accommodate.

Object name. The name of an object for this load.

Object records. The objects in the object record are ordered by library. All objects for the principal library are first. Within each library, the objects are ordered by object type, but with product loads first and product definitions second, followed by all other object types.

The record has the following fields:

Object type. The symbolic object type of the object.

Offset to additional information. The offset from the beginning of the receiver variable to the start of the rest of the information for a given format. This is to allow for expansion of the basic information. For format PRDR0100, this is 0.

Offset to directory information array. The offset from the beginning of the receiver variable to the start of the directory information array for format PRDR0800. This is to allow for expansion of the basic directory information.

Offset to folder records. The offset from the beginning of the receiver variable to the start of the first folder record for format PRDR0300. This is to allow for expansion of the basic folder information.

Offset to installed full path name. The offset from the beginning of the receiver variable to the start of the installed full path name for format PRDR0800. This is to allow for expansion of the basic directory information.

Offset to installed product directory name. The offset from the beginning of the receiver variable to the start of the installed product directory name for format PRDR0800. This will be the product directory path that follows the delimiter at the end of the product home directory. This offset will be equal to the length of the installed full path plus the offset to the installed full path if there is no product directory. This is to allow for expansion of the basic directory information.

Offset to library records. The offset from the beginning of the receiver variable to the start of the first library record for format PRDR0200. This is to allow for expansion of the basic library information.

Offset to load records. The offset from the beginning of the receiver variable to the start of the first load record for format PRDR0600. This is to allow for expansion of the basic load information.

Offset to next library record. The offset from the beginning of the receiver variable to the start of the next library record for format PRDR0200. If there are no more library records, then this is 0.

Offset to object records. The offset from the beginning of the receiver variable to the start of the first object record for format PRDR0400. This is to allow for expansion of the basic object information.

Offset to option records. The offset from the beginning of the receiver variable to the start of the first option record for format PRDR0500. This is to allow for expansion of the basic option information.

Offset to primary full path name. The offset from the beginning of the receiver variable to the start of the primary full path name for format PRDR0800. This is to allow for expansion of the basic directory information.

Offset to primary product directory name. The offset from the beginning of the receiver variable to the start of the primary product directory name for format PRDR0800. This will be the product directory path that follows the delimiter at the end of the product home directory. This offset will be equal to the length of the primary full path plus the offset to the primary full path if there is no product directory. This is to allow for expansion of the basic directory information.

Offset to public object authority array. The offset from the beginning of the receiver variable to the start of the public object authority array for format PRDR0800. This is to allow for expansion of the primary product home directory information.

Offset to software agreement document names array. The offset from the beginning of the receiver variable to the start of the software agreement document array for format PRDR0900. This is to allow for expansion of the software agreement document information.

Option records.
An array for which each entry includes the following fields:

Postoperation exit program name. The name of the postoperation exit program for this load for this primary library. If there is no postoperation exit program for this library, this will be blank.

Preoperation exit program names. An array of the preoperation exit programs for this load for this primary library. If there are no preoperation exit programs for this library, this will be an array of length 0.

Primary folder. The name of a primary folder for this load.

Primary full path name. The name of the primary full path. It contains a directory name in the CCSID that is indicated in the CCSID of returned directories field. The primary full path contains the primary product home directory concatenated with a slash (/), which is concatenated with the primary product directory name. The length of the product directory is the length of the primary full path plus the offset to the primary full path minus the offset to the primary product directory name.

Primary language load identifier. For code loads, this field contains the primary language of the product option. This is the National Language Version (NLV) of the language that is installed in the libraries. It will be blank if no language is installed in the libraries for the code load. For language loads (29xx), this field will always be blank.

Primary library name. The name of the primary library that was specified when the product load object was created.

Product ID. The product ID for which information was returned.

Product option. The product option for which information was returned.

Product option message ID. The message ID associated with this product option. The message ID was specified when the product definition was created.

Public data authority. The public data authority given to the directory by the Restore Licensed Program (RSTLICPGM) command when this load is installed if the directory does not exist. If the product load has not been successfully packaged, this field is blank.

Possible values follow:

Public object authorities array. The public object authority given to the directory by the Restore Licensed Program (RSTLICPGM) command when this load is installed if the directory does not exist. The number of elements is the number of public object authorities for this product directory. If the product load has not been successfully packaged, the number of public object authorities will be set to 0.

Possible values follow:

Registration type. The registration type associated with the product. The registration type and registration value together make up the registration ID for the product.

The possible values are:

Registration value. The registration value associated with the product. The registration type and registration value together make up the registration ID for the product.

Release date. Indicates the value specified for the release date when the product definition for this product load was created. The release date is in the format yymmdd, where yy equals year, mm equals month, and dd equals day. If no release date was specified when the product definition was created, then the release date is blank.

Release date century. The century that corresponds to the release date of the product.

Possible values follow:

Release level. The release level of the product for which information was returned.

The release level can be returned in the following formats:

For V7R2M0, when format PRDR0700 is requested, the valid values for this field are *CUR, *PRV, V5R4M0, V6R1M0, V6R1M1, V7R1M0, and V7R2M0.

Release level (for each returned operating system release level). The individual release level returned. One or more may be returned.

Requirements met between base and option value. When a product allows mixed releases between its base and option, certain requirements must be met. This value represents the reason why the release requirements between the base and option may or may not be in error.

The possible values are:

Reserved. An ignored field.

Secondary language library name. The secondary language library name that was specified when the load was created. If this is a code load, the secondary language library name is blank.

Software agreement document names array. An array in which each entry includes the following fields:

Software agreement document name. The name of one entry in the software agreement documents list for this product load. It contains a software agreement document name in the CCSID that is indicated in the CCSID of returned software agreement document names field.

Supported flag. Whether this load is currently supported. A load can be supported by using the Work with Supported Products (WRKSPTPRD) command in the System Manager for IBM i licensed program.

The possible values are:

Symbolic load state. The symbolic state of the load for which information was returned. This value, in conjunction with the load error indicator, can be used to determine if the load is installed correctly.

The possible values are:


Error Messages



API introduced: V2R3


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