Create Program Temporary Fix (CRTPTF)

The Create Program Temporary Fix (CRTPTF) command creates a temporary fix for a product that you have developed. The product must be created and installed before using this command.

Parameters

Keyword Description Choices Notes
PTF PTF identifier Character value Required, Positional 1
LICPGM Product Character value Required, Positional 2
RLS Release level Character value Required, Positional 3
OPTION Option 1-99, *BASE Optional
LODID Load ID Character value, *CODEDFT Optional
PTFOBJ PTF objects Single values: *NONE
Other values (up to 300 repetitions): Element list
Optional
Element 1: Object name Name
Element 2: Object type Character value
OBJLIB Object libraries Element list Optional
Element 1: Development library Name, *CURLIB
Element 2: Primary library Name, *PRINCIPAL
PTFDOC PTF documents Single values: *NONE
Other values (up to 300 repetitions): Element list
Optional
Element 1: Document Character value
Element 2: Folder Character value
DIROBJ Objects in a directory Single values: *NONE
Other values (up to 30 repetitions): Element list
Optional
Element 1: Product Directory Path name
Element 2: Development Directory Path name, *PRDDIR
Element 3: Object Values (up to 100 repetitions): Character value
COVER Cover letters Single values: *NONE
Other values (up to 50 repetitions): Element list
Optional
Element 1: Source cover letter file Qualified object name
Qualifier 1: Source cover letter file Name
Qualifier 2: Library Name, *LIBL
Element 2: Source cover letter member Name
Element 3: National language version Character value
PREREQ Prerequisite PTFs Single values: *NONE
Other values (up to 300 repetitions): Character value
Optional
COREQ Corequisite PTFs Single values: *NONE
Other values (up to 300 repetitions): Character value
Optional
EXITPGM PTF exit programs Single values: *NONE
Other values (up to 50 repetitions): Element list
Optional
Element 1: Program Qualified object name
Qualifier 1: Program Name
Qualifier 2: Library Name, *CURLIB
Element 2: Run option *BOTH, *APPLY, *REMOVE, *PREAPY, *PRERMV, *PREBTH
Element 3: Type *PTF, *OBJLST
Element 4: User data Character value, *NONE
TGTRLS Target release Character value, *CURRENT, *PRV Optional

PTF identifier (PTF)

Specifies the identifier (ID) of the PTF being created. The PTF ID must be in the valid range for the specified product and release.

Product (LICPGM)

Specifies the product ID for which the PTF is being created.

Release level (RLS)

Specifies the version, release, and modification level of the product the PTF is being created for. Specify the release level in one of the following formats:

Option (OPTION)

Specifies whether the PTF is for the base product or an option of the base product.

The possible values are:

*BASE
The PTF is for the base option.
product-option-number
Specify the product option of the PTF being created.

Load ID (LODID)

Specifies the load ID for the PTF being created.

The possible values are:

*CODEDFT
The default code load ID, 5001, is used.
load-ID
Specify a language load ID or a valid code load ID. For a language load, the load ID must be one of the valid IBM national language versions and be specified in the form 29xx. For a code load, the load ID must range from 5001 to 9999.

PTF objects (PTFOBJ)

Specifies the objects to be contained in the PTF. The objects must be listed with their associated object type. They must exist in the development library specified and the primary library specified on the OBJLIB parameter. A maximum of 300 objects can be specified.

The possible values are:

*NONE
No objects are specified for the PTF.

The possible PTF object name values are:

object-name
Specify the name of the PTF object.

The possible PTF object type values are:

object-type
Specify the PTF object type.

Object libraries (OBJLIB)

Specifies the development library and primary library for this PTF.

The possible development library values are:

*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
development-library
Specify the library where the PTF objects are located.

The possible primary library values are:

*PRINCIPAL
The PTF objects are associated with the principal library of the specified product option.
primary-library
Specify the product library with which the PTF objects are associated.

PTF documents (PTFDOC)

Specifies the documents to be contained in the PTF. A maximum of 300 documents can be specified.

The possible values are:

*NONE
No documents are specified for the PTF.

The possible PTF document name values are:

document-name
Specify the name of the document.

The possible PTF folder name values are:

folder-name
Specify the folder in which the PTF document will be installed. The create PTF function will append "/QP" to the folder name specified and save the document from the resulting subfolder.

Objects in a directory (DIROBJ)

Specifies the product directory that the PTF is for, the development directory where the PTF is found, and the names of objects in the development directory that are included in the PTF.

Up to 30 repetitions are permitted. A product directory, a development directory, and at least one object name must be specified unless DIROBJ(*NONE) is specified.

The following restrictions exist when you are assigning directory names:

A backslash (\) in the directory name is always converted to a forward slash (/). A trailing slash is always ignored. The following characters are not allowed in a directory name:

If the leading slash (/) is omitted, one will be assumed, and the inclusion of this leading slash must not cause the directory name to exceed the maximum directory name length of 1024 characters. The directory name may indicate a directory that is nested in other directories, for example, /A/B/C. The maximum directory name length includes all slashes and all nested directory names.

The possible single value is:

*NONE
The PTF includes no objects that will be stored in directories when the PTF is applied.

Element 1: Product Directory Name

directory-name
Specify the directory defined by the product which is the default directory where the objects will reside when the PTF is applied. The original objects are replaced with new objects.

Element 2: Development Directory Name

*PRDDIR
The development directory is the same as the product directory.
directory-name
Specifies the directory where objects that will be included in the PTF currently reside.

Element 3: Object Name

object-name
Specifies the list of objects in the development directory that are included in this PTF. Up to 100 object names can be specified for each development directory. If more than 100 objects need to be included for a given product directory,the development directory combination can be specified again using a different set of object names.

A given object name must be specified no more than once.

Objects names are limited to a maximum of 255 characters.

Cover letters (COVER)

Specifies the file containing the source text for the PTF cover letter. A member is added to the PTF cover letter file QAPZCOVER in library QGPL. The source text data, PTF language, the data that takes the place of the data, and the requisite information is copied to the member. A maximum of 50 cover letters can be specified.

The possible single value is:

*NONE
No cover letters are specified for this PTF.

The possible value for the cover letter member is:

cover-letter-source-member
Specify the name of the file member which contains the cover letter text.

The possible library values are:

*LIBL
The library search list is used to locate the file.
library-name
Specify the name of the library that locates the file.

The possible value for the cover letter file is:

file-name
Specify the name of the file which contains the cover letter text.

The possible cover letter language value is:

NLV
Specify the national language version (NLV) code for the cover letter source. Each language code can be specified only once.

Prerequisite PTFs (PREREQ)

Specifies a list of PTFs that must be applied before applying the current PTF. If these PTFs are not applied, the current PTF will not function. A maximum of 300 prerequisites and corequisites combined can be specified.

The possible values are:

*NONE
No PTFs are required.
PTF-ID
Specify the number of the PTF required by this PTF.

Corequisite PTFs (COREQ)

Specifies a list of accompanying PTFs that are required to enable the new PTF. The current PTF is not applied unless all accompanying PTFs listed are also applied. A maximum of 300 prerequisites and corequisites combined can be specified.

The possible values are:

*NONE
No PTFs are required.
PTF-ID
Specify the number of the PTF.

PTF exit programs (EXITPGM)

Specifies the exit programs to be to be called during the PTF apply or remove operation. A maximum of 50 exit programs can be specified.

The possible single value is:

*NONE
No exit programs are specified for this PTF.

The possible program name values are:

program
Specify the name of an exit program for this PTF.

The possible library values are:

*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name
Specify the name of the library to be searched.

The possible run option values are:

*BOTH
The exit program is called during both apply and remove operations.
*APPLY
The exit program is called during the apply operation only.
*REMOVE
The exit program is called during the remove operation only.
*PREAPY
The exit program is called before apply PTF processing and at the end of apply PTF processing.
*PRERMV
The exit program is called before and at the end of remove PTF processing.
*PREBTH
The exit program is called before the PTF is applied or removed and at the end of the apply or remove PTF processing.

The possible type values are:

*PTF
The exit program object is included with the PTF objects. The exit program only exists until the PTF is permanently applied.
*OBJLST
The exit program object is not included with the PTF objects. The exit program must exist in the object list for the product, option, release, and load of the PTF or the code load for the product's base option.

The possible user data values are:

*NONE
No user data is passed to the exit program when it is called.
user-data
Specify the user data.

Target release (TGTRLS)

Specifies the earliest release of the operating system on which you intend to load and apply the PTF.

*CURRENT
The PTF is to be loaded and applied on the release of the operating system currently running on your system. The PTF also can be loaded and applied on a system with any later release of the operating system installed.
*PRV
The PTF is to be loaded and applied on the previous release with modification level 0 of the operating system. The PTF can be loaded and applied on a system with any later release of the operating system installed.
target-level
Specify 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.

Examples

Example 1: Creating a PTF

CRTPTF   PTF(1X00001)  LICPGM(1X12345)  RLS(V5R4M0)
         OPTION(*BASE)  LODID(*CODEDFT)  PTFOBJ((X00PGM01 *PGM))
         OBJLIB(PTFDEVLIB *PRINCIPAL)

This command creates PTF 1X00001 for release V5R4M0 of product 1X12345. The PTF is created using program X00PGM01 in library PTFDEVLIB. When applied, this PTF replaces program X00PGM01 in the principal product library of the *BASE option code load. This PTF is created to be loaded and applied on the current release of the operating system or any later release.

Example 2: Creating a PTF with a Document

CRTPTF   PTF(1X00002)  LICPGM(1X12345)  RLS(V5R4M0)
         OPTION(*BASE)  LODID(*CODEDFT)
         PTFDOC((X00DOC.001 X00FLR.001))

This command creates PTF 1X00002 for release V5R4M0 of product 1X12345. The PTF is created using document X00DOC.001 in folder X00FLR.001/QP. Notice that the document is taken from folder X00FLR.001/QP. Create PTF adds "/QP" to the end of the folder specified when searching for the document to be included. When applied, this PTF replaces document X00DOC.001 in folder X00FLR.001 of the *BASE option code load.

Example 3: Creating a PTF with a Cover Letter

CRTPTF   PTF(1X00003)  LICPGM(1X12345)  RLS(V5R4M0)
         OPTION(*BASE)  LODID(*CODEDFT)
         COVER((PTFDEVLIB/PTFCVRLTRF PTF1X00003 2924))
         EXITPGM((EXTPGMLIB/QPZ1X00003 *BOTH *PTF))

This command creates PTF 1X00003 for release V5R4M0 of product 1X12345. The cover letter for the PTF is created using source text from file PTFCVRLTRF in library PTFDEVLIB member PTF1X00003. The cover letter is created for National Language Version (NLV) 2924. The *PTF value specified on the exit program parameter causes program QPZ1X00003 to be saved with the PTF as a temporary object. Temporary objects are deleted when the PTF is permanently applied or removed. Note the temporary object naming convention is used for the exit program. Ensure that any temporary object names used are unique for this product release to avoid over writing other PTFs. The *BOTH value causes this exit program to be called during both apply and remove processing. Temporary objects are identified by QPZ1 at the beginning of the name.

Example 4: Creating a PTF for a Previous Release

CRTPTF   PTF(1X00004)  LICPGM(1X12345)  RLS(V5R3M0)
         OPTION(*BASE)  LODID(*CODEDFT)
         PTFOBJ((X00PGM02 *PGM))
         OBJLIB(PTFDEVLIB *PRINCIPAL)  TGTRLS(V5R3M0)

This command creates PTF 1X00004 for release V5R3M0 of product 1X12345. The PTF is created using program X00PGM02 in library PTFDEVLIB. When applied, this PTF replaces program X00PGM02 in the principal product library of the *BASE option code load. This PTF is created to be loaded and applied on release V5R3M0 of the operating system or any later release.

Error messages

*ESCAPE Messages

CPF35CC
Library required for PTF operation already exists.
CPF35DC
Primary library not found.
CPF35D3
Cover letter not copied.
CPF3505
Corequisite PTF &1-&2 &5 contains common objects.
CPF3506
Length of directory name too long.
CPF3507
Corequisite PTF &1-&2 &8 not specified.
CPF3509
Specified corequisite PTF &1-&2 &7 not valid.
CPF351A
Directory object name not valid.
CPF351B
Duplicate directory object specified.
CPF357A
Parameter value not valid.
CPF357B
Product not found.
CPF357D
Document or folder name not correct.
CPF3571
PTF ID &1 not within valid range.
CPF3572
PTF &2-&1 &4 already exists.
CPF3573
Resources required for product &1 are not available.
CPF3574
PTF ID not valid.
CPF358A
Release not valid.
CPF358B
PTF not created.
CPF358C
Create PTF not allowed for product &1.
CPF359C
Requisite type not valid.
CPF3901
PTF &1-&2 &4 not created.