Copy PTF Group (CPYPTFGRP)

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

The Copy Program Temporary Fix Group (CPYPTFGRP) command copies program temporary fix (PTF) groups from tape, optical, save file, or service, to tape, optical, save file, or service. The PTF group information is copied to the specified device. The PTFs named within the PTF group can also be copied using the CPYPTF parameter. The Work with PTF Groups (WRKPTFGRP) command can be used to display and work with a list of PTF groups on the system.

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

Parameters

Keyword Description Choices Notes
PTFGRP PTF group Character value, *ALL Required, Positional 1
FROMDEV From device Name, *SERVICE, *SAVF Required, Positional 2
TODEV To device Name, *SERVICE, *SAVF Required, Positional 3
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
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
REPLACE Replace *LVLGT, *NO, *YES Optional
RELPTFGRP Copy related PTF groups *NO, *YES Optional
DTACPR Data compression *DEV, *NO, *YES Optional
CPYPTF Copy PTFs *NO, *YES Optional
RPLSPR Replace superseded PTFs *YES, *NO Optional
COVER Copy PTF cover letter Character value, *DFT, *NONE Optional
Top

PTF group (PTFGRP)

Specifies the name of the PTF group(s) to be copied.

This is a required parameter.

PTF-group-name
Specify the name of the PTF group to be copied.
*ALL
All PTF groups are copied.
Top

From device (FROMDEV)

Specifies the name of the device that contains the PTF groups to be copied.

This is a required parameter.

*SERVICE
The PTF groups are copied from the system. The Work with PTF Groups (WRKPTFGRP) command can be used to display the list of PTF groups on the system.
*SAVF
The PTF groups are copied from a save file.
device-name
Specify the name of the tape or optical device from which the PTF groups are copied.
Top

To device (TODEV)

Specifies the device to which the PTF groups are copied.

This is a required parameter.

*SERVICE
The PTF groups are copied to the system. The Work with PTF Groups (WRKPTFGRP) command can be used to display the list of PTF groups on the system. TODEV(*SERVICE) cannot be specified when FROMDEV(*SERVICE) is specified.
*SAVF
The PTF groups are copied to a save file.
device-name
Specify the name of the tape or optical device to which the PTF groups are copied.
Top

From save file (FROMSAVF)

Specifies the name and library of the save file from which the PTF groups 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 PTF groups 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 is searched for the first media file for the specified PTF group.
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 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

Volume identifier (TOVOL)

Specifies the volume identifier of the tape or optical volume that receives the copied PTF groups.

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

To tape sequence number (TOSEQNBR)

Specifies the sequence number of the data file that receives the copied PTF group.

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

*END
The PTF groups are copied starting at the end of the tape.
sequence-number
Specify the sequence number of the data file that receives the first copied PTF group. 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 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 To device (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 PTF groups are copied.

Note: This parameter is valid only if *SAVF is specified on the To device (TODEV) 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 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 an uncleared save file is automatically cleared while copying the PTF groups. This parameter applies only when TODEV(*SAVF) is specified.

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

Replace (REPLACE)

Specifies what to do if a PTF group being copied already exists on the system. If a PTF group does not already exist on the system, it will be copied. This parameter applies only when TODEV(*SERVICE) is specified.

*LVLGT
Copy an existing PTF group of the same name only when the level of the PTF group being copied is greater than the level of the PTF group on the system.
*NO
Do not replace an existing PTF group of the same name. An error will occur if a PTF group of the same name already exists on the system and PTFGRP(*ALL) is not specified.
*YES
Replace an existing PTF group of the same name regardless of the level.
Top

Copy related PTF groups (RELPTFGRP)

Specifies whether to copy related PTF groups. This parameter applies only when FROMDEV(*SERVICE) is specified.

*NO
The related PTF groups named within the specified PTF group are not copied.
*YES
The related PTF groups named within the specified PTF group are copied. Any related PTF groups named within related PTF groups are also copied.
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

Copy PTFs (CPYPTF)

Specifies whether to copy PTFs named within the specified PTF group in addition to the PTF group information. This parameter applies only when FROMDEV(*SERVICE) is specified and a tape or optical device name is specified on the TODEV parameter.

*NO
The PTFs named within the specified PTF group are not copied.
*YES
The PTFs named within the specified PTF group are copied. All prerequisite, corequisite, and distribution requisite PTFs for PTFs named within the PTF group are also copied. A PTF is copied only if it is for a supported or installed product and a save file exists on the system for the PTF or a superseding PTF.
Top

Replace superseded PTFs (RPLSPR)

Specifies whether to replace PTFs or requisites of PTFs named within the specified PTF group. A PTF can be replaced if a save file is not found and a superseding PTF with a save file exists on the system. This parameter applies only when CPYPTF(*YES) is specified.

*YES
When copying PTFs, if a PTF or requisite of a PTF named within the specified PTF group does not have a save file, replace the PTF with the latest superseding PTF that has a save file. If a PTF or requisite of a PTF named within the PTF group has a save file, the PTF will be copied regardless of whether the PTF is superseded or has a later superseding PTF.
*NO
When copying PTFs, do not replace PTFs that do not have a save file on the system. Save files must exist for all PTFs and requisites of PTFs named within the specified PTF group.
Top

Copy PTF cover letter (COVER)

Specifies whether to copy the cover letters with the PTFs. This parameter applies only when CPYPTF(*YES) is specified.

*DFT
Cover letters are copied using the default language feature code. If there is only one cover letter for the PTF, it will be copied. If there is more than one cover letter for the PTF, the following criteria will be used to determine which cover letter to copy.

The language feature code that matches the service contact information (WRKCNTINF) will be used.

If no language feature code matches the service contact information, the language feature code that matches the primary language of the operating system will be used.

If no cover letters match the language feature code in the service contact information, or the language feature code of the operating system, no cover letter is copied for the PTF.

*NONE
No PTF cover letters are copied.
feature-code
Specify the language feature code of the PTF cover letters you want to copy. If a cover letter for the selected language feature code is not available, no cover letter is copied for the PTF.
Top

Examples

Example 1: Copying a PTF Group to a Save File

CPYPTFGRP   PTFGRP(SF99100)  FROMDEV(*SERVICE)  TODEV(*SAVF)
            TOSAVF(MYLIB/MYSAVF)

This command copies the PTF group named SF99100 from the system to a save file named MYSAVF in library MYLIB. Related PTF groups named in SF99100 are not copied.

Example 2: Copying a PTF Group to a Tape

CPYPTFGRP   PTFGRP(SF99200)  FROMDEV(*SERVICE)  TODEV(TAP01)
            TOSEQNBR(1) RELPTFGRP(*YES) CPYPTF(*YES)

This command copies the PTF group named SF99200 and all of its related PTF groups from the system to the tape mounted in device TAP01 beginning with sequence number 1. All PTFs named within the PTF groups are copied to the tape. Cover letters are copied for the PTFs using the default language feature code.

Example 3: Copying All PTF Groups from Optical

CPYPTFGRP   PTFGRP(*ALL)  FROMDEV(OPT01)  TODEV(*SERVICE)
            REPLACE(*YES)

This command copies all the PTF groups from the volume mounted on optical device OPT01 to the system. Any PTF groups that already exist on the system are replaced.

Example 4: Copying a PTF Group from Tape to Save File

CPYPTFGRP   PTFGRP(SF99300)  FROMDEV(TAP01)  TODEV(*SAVF)
            TOSAVF(MYLIB/MYSAVF)

This command searches the tape mounted on device TAP01 and copies PTF group SF99300 to save file MYSAVF in library MYLIB.

Top

Error messages

*ESCAPE Messages

CPF35CC
Library required for PTF operation already exists.
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.
CPF355D
PTF group does not exist on save/restore media.
CPF355E
CPYPTFGRP ended abnormally.
CPF355F
TODEV and FROMDEV parameters cannot specify the same device.
CPF3598
PTF function already in process.
CPF36AB
No PTF groups found.
CPF36A3
PTF group &1 already exists.
CPF36A4
PTF group &1 not found.
CPF36A5
Information for PTF group &1 not complete.
CPF36A6
PTF group name &1 not valid.
CPF36B8
PTF &2-&3 &4 cannot be copied without a save file.
CPF363A
Media type of volume not valid for operation.
CPF363E
Cannot write required PTF file to optical volume.
CPF9812
File &1 in library &2 not found.
CPF9814
Device &1 not found.
OPT1660
Optical device &1 is empty.
Top