Copy Program Temporary Fix (CPYPTF)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Copy Program Temporary Fix (CPYPTF) command copies specified program temporary fixes (PTFs) from tape, diskette, optical media, service, or save file to a tape, diskette, 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 and 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 target release for the PTF objects.
Top

Parameters

Keyword Description Choices Notes
LICPGM Product Character value Required, Positional 1
FROMDEV From device Name, *SERVICE, *SAVF Required, Positional 2
TODEV To device Name, *SAVF Required, Positional 3
SELECT PTF numbers to select Single values: *ALL
Other values (up to 50 repetitions): Character value
Optional, Positional 4
OMIT PTF numbers to omit Values (up to 50 repetitions): Character value Optional
RLS Release Character value, *ONLY Optional
FROMSAVF From save file Qualified object name Optional
Qualifier 1: From save file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
FROMSEQNBR From tape sequence number 1-16777215, *SEARCH Optional
FROMENDOPT From end of media option *REWIND, *LEAVE, *UNLOAD Optional
FROMPATHID From path identifier 1-9999, *FIRST, *SELECT Optional
TOVOL Volume identifier Character value, *MOUNTED Optional
TOSEQNBR To tape sequence number 1-16777215, *END Optional
TOENDOPT To end of media option *REWIND, *LEAVE, *UNLOAD Optional
TOSAVF To save file Qualified object name Optional
Qualifier 1: To save file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
CLEAR Clear *NONE, *ALL Optional
COVER Copy PTF cover letter *YES, *NO Optional
CVRLTRLNG Cover letter language Character value, *ONLY Optional
DTACPR Data compression *DEV, *NO, *YES Optional
Top

Product (LICPGM)

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

This is a required parameter.

Top

From device (FROMDEV)

Specifies the name of the device from which the PTFs are copied.

This is a required parameter.

*SERVICE
The PTFs sent from the service support system are copied.
*SAVF
The PTFs are copied from a save file.
device-name
Specify the name of the tape, diskette, or optical device from which the PTFs are copied.
Top

To device (TODEV)

Specifies the device to which the PTFs are copied.

This is a required parameter.

*SAVF
The PTFs are copied to a save file.
device-name
Specify the name of the tape, diskette, or optical device to which the PTFs are copied.
Top

PTF numbers to select (SELECT)

Specifies which PTFs are copied. If individual PTFs are specified, a value cannot be specified for the PTF numbers to omit (OMIT) parameter.

You can enter multiple values for this parameter.

The possible values are:

*ALL
All the PTFs are copied. This parameter cannot be specified when a value of *SERVICE is specified in the From device (FROMDEV) parameter.
PTF-number
Specify the PTF number of each programming fix to be copied. A maximum of 50 PTF numbers can be specified.
Top

PTF numbers to omit (OMIT)

Specifies that all PTFs except for those specified in this parameter are copied. Specify the PTF numbers of the programming fixes not copied when all the rest are copied. A maximum of 50 PTF numbers can be specified. This parameter cannot be specified if single PTF numbers are specified in the PTF numbers to select (SELECT) parameter.

You can enter multiple values for this parameter.

Top

Release (RLS)

Specifies the release level of the software product.

The possible values are:

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

From save file (FROMSAVF)

Specifies the name and library of the save file from which the PTFs are copied.

Note: This parameter is valid only if *SAVF is specified on the From device (FROMDEV) parameter.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the save file. If no library is specified as the current library for the job, the QGPL library is used.
library-name
Specify the library where the save file is located.
Top

From tape sequence number (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 From device (FROMDEV) parameter.

*SEARCH
The tape volume searches for the first PTF file for the licensed program, and then copies that PTF.
sequence-number
Specify the sequence number where you want to begin to copy the PTF data. This sequence number must exist on the tape. Valid values range from 1 to 16777215.
Top

From end of media option (FROMENDOPT)

Specifies the operation that is performed on the tape or optical volume after the copy PTF operation ends. If one or more volumes of tape are 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.

The possible values are:

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

From path identifier (FROMPATHID)

Specifies the number that identifies a file on the optical media 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 From device (FROMDEV) parameter.

The possible values are:

*FIRST
The optical media 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
A list of the PTF files that exist on the optical media 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.
Top

Volume identifier (TOVOL)

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

Note: This parameter is valid only if a tape, diskette, or optical device name is specified on the To device (TODEV) parameter.

*MOUNTED
The volume currently placed in the device is used.
volume-identifier
Specify the volume identifier of the tape, diskette or optical volume.
Top

To tape sequence number (TOSEQNBR)

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

Note: This parameter is valid only if a tape device name is specified on the To device (TODEV) parameter.

*END
The PTFs are copied at the end of the tape.
sequence-number
Specify the sequence number of the data file that receives the copied PTFs. Valid values range from 1 through 16777215.
Top

To end of media option (TOENDOPT)

Specifies the operation that is performed on the tape or optical volume after the copy PTF operation ends. If one or more volumes of tape are 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.

The possible values are:

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

To save file (TOSAVF)

Specifies the name and library of the save file to which the PTFs are copied.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the save file. If no current library entry exists in the library list, the QGPL library is used.
library-name
Specify the library where the save file is located.
Top

Clear (CLEAR)

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

Note: This parameter is valid only if *SAVF is specified on the To device (TODEV) parameter.

*NONE
An uncleared save file is not automatically cleared.
*ALL
An uncleared save file is automatically cleared so the operation can continue.
Top

Copy PTF cover letter (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.
Top

Cover letter language (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 language feature code of the cover letter you want to copy.

Note: This parameter is valid only if *YES is specified on the Copy PTF cover letter (COVER) parameter.

*ONLY
The only cover letter associated with the PTF is copied, regardless of the language feature code.
feature-code
Specify the language feature code of the PTF cover letter you want to copy. A language feature code can be specified only when *SERVICE is specified on the FROMDEV parameter.
Top

Data compression (DTACPR)

Specifies whether data compression is used.

The possible values are:

*DEV
If the save is to tape and the target device supports compression, hardware compression is performed. Otherwise, no data compression is performed.
*NO
No data compression is performed.
*YES
If the save is to tape and the target device supports compression, hardware compression is performed. If compression is not supported, or if the save data is written to a diskette or save file, software compression is performed. If the save is running while other jobs on the system are active and software compression is used, the overall system performance may be affected.
Top

Examples

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.

Top

Error messages

*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.
CPF35C7
Volume name in FROMDEV device same as TOVOL parameter value.
CPF35C8
PTF file to be copied is not valid.
CPF35D5
Cover letter NLV not valid.
CPF354C
Cannot process PTF files on optical volume.
CPF354D
Device &1 not allowed.
CPF354F
Required PTF file cannot be processed.
CPF3558
Cannot allocate &1 in &3 type *&2.
CPF358A
Release not valid.
CPF3586
List of PTFs not correct.
CPF3598
PTF function already in process.
CPF363A
Media type of volume not valid for operation.
CPF363D
Multiple cover letters exist for PTF &2-&1 &3.
CPF363E
Cannot write required PTF file to optical volume.
CPF6602
PTF &1-&2 &3 not found.
CPF9812
File &1 in library &2 not found.
CPF9814
Device &1 not found.
Top