CPYPTFGRP (Copy PTF Group)

 

+
Search Tips   |   Advanced Search

 

CPYPTFGRP Command syntax diagram

 

Purpose

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. Only the PTF group information is copied, the PTFs named within the PTF group are not copied. 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.

 

Required Parameters

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

PTF-group-name: Specify the name of the PTF group to be copied.

*ALL: All PTF groups are copied. This value cannot be specified with TODEV(*SAVF).

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

*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 group is copied from a save file.

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

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

TODEV
Specifies the device to which the PTF groups are copied.

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

*SAVF: The PTF group is copied to a save file.

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

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

 

Optional Parameters

FROMSAVF
Specifies the save file from which the PTF group is 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 PTF group is copied.

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 FROMDEV parameter.

*SEARCH: The tape volume is searched for the first media file for the specified PTF group.

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

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.

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

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

TOENDOPT
Specifies the operation that is automatically performed on the tape or optical volume after the 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 PTF group is 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 PTF group is copied.

CLEAR
Specifies whether an uncleared save file encountered while copying the PTF group is automatically cleared.

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

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

REPLACE
Specifies what to do if the PTF group being copied already exists on the system. If the PTF group does not already exist on the system, it will be copied. This parameter only applies 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.

RELPTFGRP
Specifies whether to copy related PTF groups. This parameter only applies when FROMDEV(*SERVICE) is specified and the TODEV parameter specifies a tape or optical device.

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

Examples for CPYPTFGRP

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)

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.

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

Error messages for CPYPTFGRP

*ESCAPE Messages

CPF35CC
Library required for PTF operation already exists.
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 progress.
CPF36A3
PTF group &1 already exists.
CPF36A4
PTF group &1 not found.
CPF36A6
PTF group name &1 not valid.
CPF36AB
No PTF groups found.
CPF36AF
PTF group function already in progress.
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.