Generate Program Temporary Fix Name (QPZGENNM) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable Input Binary(4)
3 PTF information Input Char(50)
4 Format name Input Char(8)
5 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

PTF save files and cover letters are usually named Q plus the PTF ID. Sometimes a PTF for another product exists on the system and has the same ID. When this happens, another name must be selected for the PTF save file and the cover letter member name. The first 8 characters of the cover letter member name must match the PTF save file name. The Generate PTF Name (QPZGENNM) API generates a save file or cover letter member name for a PTF. Checking is done to verify that the name has not been used. A unique cover letter name is generated for each national language version (NLV).

You can use the QPZGENNM API to:


Authorities and Locks

API Public Authority
*USE

Required Parameter Group

Receiver variable
OUTPUT; CHAR(*)

The receiver variable to receive the generated name. You can specify the size of the area smaller than the format requested as long as you specify the receiver variable length parameter correctly. As a result, the API returns only the data the area can hold.

Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable. The length must be at least 8 bytes. If this value is larger than the actual receiver variable, unexpected results may occur.

PTF information
INPUT; CHAR(50)

The information about the PTF or cover letter needed to generate the name. For more information, see Format of PTF Information.

Format name
INPUT; CHAR(8)

The format of the returned information.

PTFG0100 Qualified save file name.
PTFG0200 Cover letter member, file, and library name.

For more information, see Format of Returned Information.

Error code
I/O; CHAR(*)

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


Format of PTF Information

The following describes the PTF information parameter. For a detailed description of the fields in this table, see Field Descriptions.

Offset Type Field
Dec Hex
0 0 CHAR(7) PTF ID
7 7 CHAR(7) Product ID
14 E CHAR(6) Release level
20 14 CHAR(1) Check product state
21 15 CHAR(13) Reserved
34 22 CHAR(4) National language version
38 26 CHAR(12) Reserved


Format of Returned Information

When you generate a name for a PTF or cover letter, the name is only unique in the library and file returned by the API. The formats below show the fields returned in the receiver variable parameter. For a detailed description of the fields in these tables, see Field Descriptions.

PTFG0100 Format

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 CHAR(10) File name
18 12 CHAR(10) Library name


PTFG0200 Format

Offset Type Field
Dec Hex
0 0 CHAR(28) Everything from the PTFG0100 format
28 1C CHAR(10) Member name
38 26 CHAR(*) Reserved


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.

File name. If the format requested was PTFG0100, this is the save file name to be used to store the PTF. If the format requested was PTFG0200, this is the file where the cover letter should be stored.

Check product state. Indicates whether to generate a name when the product for the PTF is not installed or supported on the system.

0 A PTF name will be generated only if the product is installed or supported. Escape message CPF35BE will be signaled when the product is not installed or supported.
1 A PTF name will be generated if the product is not installed or supported.

Library name. The library name for the PTF or cover letter file.

Member name. The member name for the cover letter.

National language version. The national language version of the cover letter for which the member name is to be generated. This field is ignored when the format is PTFG0100. For a list of valid values, see the i5/OS globalization topic collection.

Product ID. The PTF is for this product.

PTF ID. The identifier of the PTF.

Release level. The version, release, and modification level of the PTF. This must be in the format VxRyMz. Valid values for x and y are 0 through 9, and valid values for z are 0 through 9 or A through Z.

Reserved. This field is ignored in the returned variable parameter. In the PTF information parameter, this field is reserved and must contain blanks.


Usage Notes

The file name is not reserved and could be in use when a succeeding function tries to use it.

A name cannot be generated for a PTF that is already in device *SERVICE known to the system. An error will be signaled if this is done. For a description of *SERVICE, see the Log Program Temporary Fix Information (QPZLOGFX) API.

A name cannot be generated for a cover letter member if a cover letter for the same NLV and PTF ID already exists.


Error Messages

Message ID Error Message Text
CPF0CB3 E Value for reserved field not valid.
CPF24B4 E Severe error while addressing parameter list.
CPF3CF1 E Error code parameter not valid.
CPF3C19 E Error occurred with receiver variable specified.
CPF3C20 E Error found by program &1.
CPF3C21 E Format name &1 is not valid.
CPF3C24 E Length of the receiver variable is not valid.
CPF3C90 E Literal value cannot be changed.
CPF35BE E Product &1 &3 not supported or installed.
CPF35D5 E Cover letter NLV not valid.
CPF35ED E PTF ID &1 not valid.
CPF35E9 E PTF &1-&2 &3 already in *SERVICE.
CPF358A E Release not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPF36B1 E Value for parameter &1 not valid.


API introduced: V2R3

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