Create Program Temporary Fix (QPZCRTFX) API

Required Parameter Group:


1
PTF information
Input
Char(50)
2
Development library name
Input
Char(10)
3
Objects
Input
Array (*) of Char (20)
4
Number of objects
Input
Binary(4)
5
Documents
Input
Array (*) of Char(73)
6
Number of documents
Input
Binary(4)
7
Requisite PTFs
Input
Array(*) of Char(24)
8
Number of requisite PTFs
Input
Binary(4)
9
Exit programs
Input
Array(*) of Char(84)
10
Number of exit programs
Input
Binary(4)
11
Problem IDs
Input
Array(*) of Char(10)
12
Number of problem IDs
Input
Binary(4)
13
Cover letters
Input
Array(*) of Char(44)
14
Number of cover letters
Input
Binary(4)
15
Error code
I/O
Char(*)


Threadsafe: No

This API should only be used by organizations to create program temporary fixes (PTFs) for products that they develop.

The Create Program Temporary Fix (QPZCRTFX) API creates a PTF save file and optionally creates cover letters in the general purpose library (QGPL). The save file contains a PTF control object and any number of fix objects. The save file name is the PTF identifier preceded by the letter Q. If a file with the same name already exists in QGPL, a unique name is generated by the system. This name is a timestamp preceded by the letter Q. After creating the PTF, you can use the Display PTF (DSPPTF) command to view the PTF attributes.

PTFs can only be created for products that are installed.

PTFs must be created by a profile that is known to exist on all systems. This allows a PTF to be loaded on any system that has the product installed.

Authorities and Locks

API Public Authority
*EXCLUDE

Cover Letter Source File Authority
*USE

Cover Letter Source File Library Authority
*USE

Object Authority
*CHANGE

QAPZCOVER Authority
*ALL

QGPL Library Authority
*CHANGE

This API does not adopt authority.

Required Parameter Group

PTF information
INPUT; CHAR(50)

Attributes of the PTF to be created. See PTF Information Format for more information about this field.

Development library name
INPUT; CHAR(10)

The library in which the fix is located. This can be any library.

Objects
INPUT; ARRAY(*) of CHAR(20)

The name and type of each object to be included in the PTF. The first 10 characters contain the name, and the second 10 characters contain the external type of the object.

Object name
The name of the object.

Object type
The external type of the object. This must be preceded by an asterisk (*). For more information, refer to the System Manager Use book.

Number of objects
INPUT; BINARY(4)

The number of objects listed in the objects parameter. This number must be in the range of 1 through 300.

Documents
INPUT; ARRAY(*) of CHAR(73)

The name of the documents that are to be included in the PTF.

The create PTF function copies the document from a subfolder using the name specified, followed by /QP. For example, if a PTF is being created for a product folder called PRODUCT, the fix objects must be developed in a subfolder named PRODUCT/QP. The document is installed into the product folder PRODUCT during the apply PTF operation. The QP subfolder allows you to develop a PTF without changing the product.

Document name
The name of the document including the path name.

Number of documents
INPUT; BINARY(4)

The number of documents listed in the documents parameter. This number must be in the range of 1 through 300.

Requisite PTFs
INPUT; ARRAY(*) of CHAR(24)

The list of requisite PTFs. A requisite relationship exists when one PTF requires that another PTF also be applied. It is a prerequisite relationship if the other PTF does not require the first. It is a corequisite relationship if the other PTF does require the first. Prerequisite PTFs must exist within the same product. A prerequisite PTF must already exist on the system or the create operation will fail. Corequisite PTFs must exist within the same product, option, load id, and release.

For more information on this structure, see Requisite PTF Format.

Number of requisite PTFs
INPUT; BINARY(4)

The number of PTFs listed in the requisite PTFs parameter. This number must be in the range of 1 through 300.

Exit programs
INPUT; ARRAY(*) of CHAR(84)

The PTF exit programs called when a PTF is temporarily applied, permanently applied, temporarily removed, or permanently removed. Exit programs eliminate the need for you to manually carry out special instructions to install the PTF. The run option field of this parameter determines when the exit program is called.

Shipping the same exit program in two PTFs causes one PTF to supersede the other.

For more information on this structure, see Exit Programs Format and Program Temporary Fix Exit Program.

Number of exit programs
INPUT; BINARY(4)

The number of exit programs listed in the exit programs parameter. This number must be in the range of 1 through 50.

Problem IDs
INPUT; ARRAY(*) of CHAR(10)

A list of the problem IDs for problems that this PTF fixes. By listing the problem IDs, the symptom strings associated with those problems will be included in the PTFs.

Number of problem IDs
INPUT; BINARY(4)

The number of problem IDs listed in the problem IDs parameter. This number must be in the range of 1 through 300.

Cover letters
INPUT; ARRAY(*) of CHAR(44)

A cover letter can be created for each of the national language versions (NLV) that IBM supports. A member that contains source for each PTF cover letter must be supplied as input to the API. The cover letter file can be a source file with a maximum record length of 92 or a physical file with record length of 80. The cover letter must be in the file before this API is called. Only one cover letter per NLV is allowed.

For more information on this structure see Cover Letter Format.

Number of cover letters
INPUT; BINARY(4)

The number of cover letters listed in the cover letter parameter. This number must be in the range of 1 through 50.

Error code
I/O; CHAR(*)

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

PTF Information Format

For detailed descriptions of each field, see the 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(4) Product option
24 18 CHAR(10) Primary object library name
34 22 CHAR(4) Load ID
38 26 CHAR(6) OS/400 target release
44 2C CHAR(6) Reserved

Requisite PTF Format

Each entry in the array for the requisite PTFs parameter has the following format. For detailed descriptions of each field, see the Field Descriptions.
Offset Type Field
Dec Hex
0 0 CHAR(7) PTF ID
7 7 CHAR(16) Reserved
23 17 CHAR(1) Requisite type

Exit Programs Format

Each entry in the array for the exit programs parameter has the following format. For detailed descriptions of each field, see the Field Descriptions.
Offset Type Field
Dec Hex


CHAR(10) Exit program name


CHAR(10) Exit program library name


CHAR(7) Run option


CHAR(7) Exit program type


CHAR(50) User data

Cover Letter Format

Each entry in the array for the cover letter parameter has the following format. The information must be presented in the order listed below. The exact offsets for each entry are not given. For detailed descriptions of each field, see the Field Descriptions.
Offset Type Field
Dec Hex


CHAR(10) Cover letter file name


CHAR(10) Cover letter library name


CHAR(10) Cover letter member name


CHAR(4) NLV


CHAR(10) Reserved

Field Descriptions

Cover letter file name. The name of the file where the cover letter can be located.

Cover letter library name. The name of the library where the cover letter file can be located.

Cover letter member name. The member name that contains the cover letter.

Exit program library name. The library where the exit program can be found. If the exit program is part of the PTF, this is the library it currently exists in. If the exit program is part of the product, this is the primary library where the exit program exists.

Exit program name. The name of the exit program.

Exit program type. Whether the exit program is to be included in this PTF. The possible values are:

*PTF
The exit program is to be included in the PTF. The exit program must exist in the library specified in the exit program library field.

*OBJLST
The exit program is part of the product and should not be included in the PTF. The exit program must exist in one of following:

Load ID. The load ID of the product load for the PTF. This will be a language load if the PTF is for textual data, or it will be the code load.

NLV. The NLV of the cover letter. This must be a valid AS/400 NLV.

OS/400 target release. The earliest release of the operating system on which you intend to load and apply the PTF. This must be left-justified. If this is blank, the current release is assumed. The possible special values follow:

*CUR
The PTF is to be loaded, applied to, and used on the release of the operating system currently running on your system. If V3R6M0 is running on your system, *CUR means that you intend to load and apply the PTF on a system with V3R6M0 installed. The PTF also can be applied on a system with any later release of the operating system installed.

*PRV
The PTF is to be loaded, applied to, and used on the previous release with modification level 0 of the operating system. If V3R6M0 is running on your system, *PRV means that you intend to load and apply the PTF on a system with V3R1M0 installed. The PTF also can be applied on a system with any later release of the operating system installed.

Target release
The release of the operating system on which you intend to load and apply the PTF. The release level is specified in the format VxRyMz, where Vx is the version, Ry is the release, and Mz is the modification level. Valid values depend on the current version, release, and modification level, and they change with each new release.

Note: This PTF can be loaded and applied on any release after the specified target release.

Primary object library name. The library in which the objects are to be placed when the PTF is applied. If necessary, the PTF apply operation maps the primary library that is specified when the PTF was created in the actual installed library. Two cases where this is important are:

Product ID. The product for which the PTF is being created. This product must be installed on the system.

Product option. The option of the product for which the PTF is being created. All objects in the PTF must be for the same option and the same library within the option.

PTF ID. The ID the PTF is to be known by. The identifier must be 7 characters. The first character must be numeric. The second and third characters must be alphabetic. The same identifier can be used only once for each product and release level.

Release level. The version, release, and modification level of the product 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.

Requisite type. The type of requisite relationship. If this is blank, a prerequisite relationship is assumed. The possible values are:

1
The requisite PTF is a prerequisite of this PTF. The requisite PTF is required by this PTF, but it does not require this PTF. It cannot specify this PTF as a prerequisite. It must be applied before or with this PTF. If it is applied with this PTF, the system applies it first.

2
The requisite PTF is a corequisite of this PTF; it is required by this PTF, and it requires this PTF. It must specify this PTF as a corequisite. Corequisite PTFs must be applied together. When they are applied together, the system may apply either of them first. This value is not valid for PTFs with a target release earlier than V4R2M0.

(blank)
A value of 1 is assumed. The requisite PTF is a prerequisite of this PTF. The requisite PTF is required by this PTF, but it does not require this PTF.

Reserved. An error will be signaled if this field does not contain blanks.

Run option. When the exit program is to be run. The possible values are:

*BOTH
The exit program will be run at the end of apply and remove processing.

*APPLY
The exit program will be run at the end of apply processing.

*REMOVE
The exit program will be run at the end of remove processing.

*PREAPY
The exit program will be run before the PTF is applied and at the end of apply processing.

*PRERMV
The exit program will be run before the PTF is removed and at the end of remove processing.

*PREBTH
The exit program will be run before the PTF is removed and at the end of remove processing. It is also run before the PTF is applied and at the end of apply processing.

User data. Any data you want to pass to the exit program.

Error Messages

CPF24B4 E
Severe error while addressing parameter list.
CPF3CF1 E
Error code parameter not valid.
CPF3C29 E
Object name &1 is not valid.
CPF3C31 E
Object type &1 is not valid.
CPF3C90 E
Literal value cannot be changed.
CPF35BC E
Object type &1 not supported.
CPF35CC E
Library required for building PTFs already exists.
CPF35DA E
Folder &1 not valid.
CPF35DB E
Duplicate documents specified.
CPF35DC E
Primary library not found.
CPF35DD E
Problem &1 does not exist.
CPF35DF E
Value for target release not valid.
CPF35D3 E
Cover letter not copied.
CPF35D4 E
Cover letter file record length too long.
CPF35D5 E
Cover letter NLV not valid.
CPF35D6 E
Duplicate exit programs specified.
CPF35D8 E
Exit program &1 not valid.
CPF35D9 E
Duplicate objects specified.
CPF3505 E
Corequisite PTF &1-&2 &3 contains common objects.
CPF3507 E
Corequisite PTF &1-&2 &3 not specified.
CPF3509 E
Specified corequisite PTF &1-&2 &3 not valid.
CPF357A E
Parameter value not valid.
CPF357B E
Product not found.
CPF357D E
Document or folder name not correct.
CPF3570 E
No PTF IDs available in range.
CPF3571 E
PTF ID &1 not within valid range.
CPF3572 E
PTF &2-&1 &3 already exists.
CPF3573 E
Resources required for product &1 are not available.
CPF3574 E
PTF ID not valid.
CPF358A E
Release not valid.
CPF358B E
PTF not created.
CPF358C E
Create PTF not allowed for product &1.
CPF358D E
Run option not valid.
CPF358E E
Exit program type not valid.
CPF359C E
Requisite type not valid.
CPF35EC E
Duplicate requisites specified.
CPF3901 E
PTF &1-&2 &3 not created.
CPF9872 E
Program or service program &1 in library &2 ended. Reason code &3.


Top | Software Product APIs
Software Product API list | APIs by category

[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]