Program Temporary Fix Exit Program


  Required Parameter Group:


When a program temporary fix (PTF) is created, one or more PTF exit programs may be specified. The PTF exit programs are called when a PTF is temporarily applied, permanently applied, temporarily removed, or permanently removed. Exit programs are called at the end of the apply or remove processing. The pre-exit programs are called both before and after the apply or remove processing. The run option field of the exit programs parameter determines when the exit program is called. (Refer to Exit Programs Format.) Exit programs eliminate the need for you to manually carry out special instructions to install the PTF.

Shipping the same exit program in two PTFs for the same product causes one PTF to supersede the other. Avoid this by including the PTF exit program when the product is initially packaged. If a PTF exit program already exists in the product, then specify *OBJLIST for the value of the exit program type field (see Exit Programs Format). Another way to avoid unwanted superseding PTFs is to ship the exit program with a different temporary object name in each PTF. When the exit program is being shipped with the PTF, specify the value *PTF for the exit program type field (see Exit Program Format).

The interface between the Apply PTF (APYPTF) command or Remove PTF (RMVPTF) command and the exit program follows. Your exit program must have the following input parameters.

Product ID
INPUT; CHAR(7)

The software product that the PTF affects.

PTF ID
INPUT; CHAR(7)

The identification number of the PTF.

Product release level
INPUT; CHAR(6) Start of change

The release of the software product that the PTF is for. The release can be passed as one of the following formats:

End of change
Product option ID
INPUT; CHAR(4)

The option of the software product that the PTF is for.

Product load ID
INPUT; CHAR(4)

The load of the software product that the PTF is for.

PTF library
INPUT; CHAR(10)

The name of the library in which the PTF objects were placed.

User data
INPUT; CHAR(50)

Any user data specified by the PTF originator to be passed to the exit program.

Current PTF status
INPUT; CHAR(1)

The current status of the PTF. A PTF is not considered to be fully applied or removed until the PTF exit program has completed any post-apply or post-remove processing. The PTF status does not change until after the PTF exit program has been called. Therefore this parameter will contain the status of the PTF prior to the PTF operation.


PTF operation
INPUT; CHAR(1)

The change being made to the status of the PTF.


Error Messages

If one of these messages is sent, the apply PTF process fails and no following PTFs will be applied or removed. This means that if you are installing a cumulative PTF package when this failure occurs, the cumulative package will not be applied.

If an exit program sends escape message CPF3638, any other exit programs already called for that PTF are called again. This allows changes to be backed out. During the back-out operation, if all the exit programs called by the PTF run successfully, the PTF status does not change from what it was before the PTF operation was attempted. For example, the PTF was not applied and the PTF exit program failed while the PTF was being temporarily applied. The status of the PTF would then remain not applied. During the backout, the current PTF status is set to the original status of the PTF. In the example above, the exit programs are called with a current PTF status of 0 (loaded but not applied) and a PTF operation of either:

This message should only be issued if any changes made by the exit program were backed out.

When message CPF3639 is signaled, the PTF is marked damaged. This indicates that the PTF has been partially applied. Any objects contained in the PTF have already been replaced. Some of the exit programs may have completed successfully.

If an exit program signals any other escape messages, unpredictable results can be expected. Exit programs must monitor for all exceptions. Other error messages should be left in the job log for problem determination or should be sent as informational or diagnostic messages. Message CPF3569 can be used to indicate that a special handling program failed.

You can also send a completion message (CPC1214) if the exit program runs successfully.

For more information, see Example: Creating a program temporary fix exit program.



Exit program introduced: V2R2

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