CPYPTF (Copy Program Temporary Fix)

CPYPTF Command syntax diagram

 

Purpose

The Copy Program Temporary Fix (CPYPTF) command copies program temporary fixes (PTFs) from a diskette, tape, optical media, service, or save file to a diskette, tape, optical media or save file. Each PTF contains one or more objects, including programs, which can be loaded by the Load Program Temporary Fix (LODPTF) command or applied to a product by the Apply Program Temporary Fix (APYPTF) command.

 

Restrictions

  1. This command is shipped with public *EXCLUDE authority and the QPGMR, QSYSOPR, QSRV, and QSRVBAS user profiles have private authorities to use the command.
  2. If the PTF being copied does not have a target release or if the specified target release is not a valid save and restore release, the PTF will be copied to the earliest valid save and restore release for the PTF objects.

 

Required Parameters

LICPGM
Specifies the 7-character identifier of the product for which the PTFs are copied.

FROMDEV
Specifies the name of the device that contains the PTFs to be copied.

*SERVICE: The PTFs sent from the service support system are copied.

*SAVF: The PTFs are copied from a save file.

diskette-device-name: Specify the name of the diskette device from which the PTFs are copied.

tape-device-name: Specify the name of the tape device from which the PTFs are copied.

optical-device-name: Specify the name of the optical device from which the PTFs are copied.

TODEV
Specifies the device to which the PTFs are copied.

*SAVF: The PTFs are copied to a save file.

diskette-device-name: Specify the diskette device name to which the PTFs are copied.

tape-device-name: Specify the name of the tape device to which the PTFs are copied.

optical-device-name: Specify the name of the optical device to which the PTFs are copied.

SELECT
Specifies which of the PTFs for the specified product are copied. The OMIT parameter cannot be specified if SELECT is specified with PTF numbers.

*ALL: All the PTFs for the specified program are copied.

PTF-number: Specify the PTF identification numbers of the PTFs that are copied.

OMIT
Specifies that all PTFs, except for those specified in this parameter, are copied.

PTF-number: Specify the PTF numbers of the PTFs to be omitted. Up to 50 PTF numbers can be specified. The OMIT parameter cannot be specified if single PTF numbers are specified on the SELECT parameter.

 

Optional Parameters

FROMSAVF
Specifies the save file from which the PTFs are copied.

The name of the save file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*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.

save-file-name: Specify the name of the save file from which the PTFs are copied.

FROMSEQNBR
Specifies the sequence number on the tape volume from which the PTFs are copied.

Note: This parameter is valid only if a tape device name is specified on the FROMDEV parameter.

*SEARCH: The tape volume is searched for the first program temporary fix (PTF) file for the specified licensed program.

sequence-number: Specify the sequence number at which to begin to copy the PTF data. This sequence number must exist on the tape. Valid values range from 1 to 16777215.

FROMENDOPT
Specifies the operation that is automatically performed on the tape or optical volume after the PTF operation ends. If one or more volumes of tape is involved, this parameter applies only to the last volume.

Note: This parameter is valid only if a tape or optical device name is specified on the FROMDEV parameter. For optical devices, *UNLOAD is the only special value supported, *REWIND and *LEAVE will be ignored.

*REWIND: The tape is automatically rewound, but not unloaded, after the operation has ended.

*LEAVE: The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.

*UNLOAD: The tape is automatically rewound and unloaded after the operation ends. Some optical devices will eject the volume after the operation ends.

FROMPATHID
Specifies the number that identifies a file on the optical volume that contains the PTFs to be copied. The PTF files for each product and release that exist on the optical media have a path identifier number to allow the files to be processed in a specific order. Only the PTFs from the specified path identifier are copied on your system.

Note: This parameter is valid only if an optical device name is specified on the FROMDEV parameter.

*FIRST: The optical volume is searched for the first PTF file for the specified product and release, according to the search dependency specified on the SELECT parameter.

  • When a specific PTF identifier is specified on the SELECT parameter, the first occurrence of the specified PTF is copied.
  • When *ALL is specified on the SELECT parameter, the existing PTF file with the lowest path identifier is copied.

*SELECT: An interactive list of the PTF files that exist on the optical volume that match the product and release is shown. You can select the specific file from which PTFs are copied. This value cannot be selected in a batch environment.

path-identifier: Specify the path identifier of the existing PTF file from which to copy the PTF data for the product and release.

TOVOL
Specifies the volume identifier of the tape, diskette or optical volume that receives the copied PTFs.

*MOUNTED: The volume currently placed in the device is used.

volume-identifier: Specify the volume identifier of the tape, diskette or optical volume.

TOSEQNBR
Specifies the sequence number of the data file that receives the copied PTFs.

*END: The system saves the PTFs after the last sequence number on the tape.

sequence-number: Specify the sequence number of the file. Valid values range from 1 through 16777215.

TOENDOPT
Specifies the operation that is automatically performed on the tape or optical volume after the PTF operation ends. If one or more volumes of tape is involved, this parameter applies only to the last volume.

Note: This parameter is valid only if a tape or optical device name is specified on the TODEV parameter. For optical devices, *UNLOAD is the only special value supported, *REWIND and *LEAVE will be ignored.

*REWIND: The tape is automatically rewound, but not unloaded, after the operation has ended.

*LEAVE: The tape does not rewind or unload after the operation ends. It remains at the current position on the tape drive.

*UNLOAD: The tape is automatically rewound and unloaded after the operation ends. Some optical devices will eject the volume after the operation ends.

TOSAVF
Specifies the qualified name of the save file to which the PTFs are copied.

The name of the save file can be qualified by one of the following library values:

*LIBL: All libraries in the job's library list are searched until the first match is found.

*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.

save-file-name: Specify the name of the save file to which the PTFs are copied.

CLEAR
Specifies whether uncleared save files encountered while copying the PTFs are automatically cleared.

*NONE: An uncleared save file encountered while PTF data is being saved is not automatically cleared.

*ALL: An uncleared save file, encountered while PTF data is being saved, is automatically cleared so the operation can continue.

COVER
Specifies whether to copy the cover letter with the PTF. Cover letters will not be copied if the FROMDEV or TODEV parameter specifies a diskette device or if FROMDEV(*SERVICE) is specified with more than 1 PTF (SELECT parameter).

*YES: The cover letter is copied.

*NO: The cover letter is not copied.

CVRLTRLNG
Specifies the cover letter language of the PTF to be copied. If FROMDEV(*SERVICE) is specified and there are multiple cover letters for a PTF (multiple languages), specify the feature code of the cover letter you want to copy.

*ONLY: The only cover letter associated with the PTF is copied, regardless of the feature code.

feature-code: Specify the feature code of the PTF cover letter you want to copy.

DTACPR
Specifies whether data compression is performed.

*DEV: If the tape device has the hardware compression feature installed, processing proceeds as if DTACPR(*YES) is specified. If the compression feature is not installed or if save data is written to a diskette or save file, processing proceeds as if DTACPR(*NO) is specified.

*NO: No data compression or decompression occurs.

*YES: Program data compression is done. If the copy operation is to tape and the target device has the hardware compression feature, hardware compression is done. If the feature is not present or if the copy data is written to a diskette or save file, software compression is done. If the copy operation is running while other jobs on the system are active and software compression is used, overall system performance may be affected.

RLS
Specifies the release level of the software product.

*ONLY: This value is valid only if one release is installed or supported on the system when FROMDEV(*SERVICE) is specified or when the FROMDEV parameter is an optical device and only one release of the product exists on the media. If the FROMDEV parameter is a tape or diskette device, the release level of the software product on the media is ignored.

release-level: Specify the release level in VxRyMz format, where Vx is the version number, Ry is the release number, and Mz is the modification level. The variables x and y can be a number from 0 through 9, and the variable z can be a number from 0 through 9 or a letter from A through Z.

Examples for CPYPTF

Example 1: Copying PTFs to a Save File

CPYPTF   LICPGM(5722SS1)  FROMDEV(TAP01)
  TODEV(*SAVF)  SELECT(*ALL)  TOSAVF(MYLIB/PTFFILE)

This command copies all the PTFs from a tape named TAP01 into a save file named PTFFILE for the product 5722SS1.

Example 2: Copying PTFs from an optical device

CPYPTF   LICPGM(5722SS1) FROMDEV(OPT01) TODEV(TAP01)
  SELECT(*ALL)  FROMPATHID(2) RLS(*ONLY)

This command copies all the PTFs for product 5722SS1 that exist in the file with path identifier 0002 from the optical device named OPT01 to the tape device named TAP01.

Error messages for CPYPTF

*ESCAPE Messages

CPF35AE
Duplicate PTF &1 found.
CPF35CC
Library required for PTF operation already exists.
CPF35C2
PTF &1-&2 &3 cannot be included.
CPF35C3
PTF &1-&2 cannot be included.
CPF35C4
CPYPTF ended abnormally.
CPF35C6
TOVOL parameter must be specified.
CPF35C8
PTF file to be copied is not valid.
CPF354D
Device &1 not allowed.
CPF3558
Cannot allocate &1 in &3 type *&2.
CPF358A
Release not valid.
CPF3586
List of PTFs not correct.
CPF3598
PTF function already in process.
CPF6602
PTF &1-&2 &3 not found.
CPF9812
File &1 in library &2 not found.
CPF9814
Device &1 not found.