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:
- This command is shipped with exclude (*EXCLUDE) public authority. The QPGMR, QSYSOPR, QSRV, and QSRVBAS user profiles are shipped with private authorities to use this 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 |
PTFGRPLVL | PTF group level | 1-99999, *INSTALLED, *LATEST, *ALL | Optional |
RELPTFGRP | Copy related PTF groups | *NO, *YES, *INSTALLED, *LATEST | 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 PTF group(s) to be copied.
This is a required parameter.
- *ALL
- All PTF groups are copied.
- name
- Specify the name of the PTF group to be copied.
Top |
From device (FROMDEV)
Specifies 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.
- 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.
- name
- Specify the name of the tape or optical device to which the PTF groups are copied.
Top |
From save file (FROMSAVF)
Specifies 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.
Qualifier 1: From save file
- name
- Specify the name of the save file.
Qualifier 2: Library
- *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.
- name
- Specify the name of 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.
- 1-16777215
- Specify the sequence number where you want to begin to copy the PTF data. This sequence number must exist on the tape.
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.
- *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.
- character-value
- 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.
- 1-16777215
- Specify the sequence number of the data file that receives the first copied PTF group.
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.
- *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 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.
Qualifier 1: To save file
- name
- Specify the name of the save file.
Qualifier 2: Library
- *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.
- name
- Specify the name of 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.
The number of different levels of a PTF group of the same name that can exist on the system is controlled by the PTF group levels (PTFGRPLVL) parameter of the Change Service Attributes (CHGSRVA) command. When copying a PTF group, the value specified for the PTFGRPLVL parameter indicates the maximum number of different levels of the PTF group that can exist on the system. The lowest levels of the PTF group will automatically be deleted, leaving only the highest levels of the PTF group on the system after the PTF group is copied.
Note: 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 highest level of the PTF group on the system.
- *NO
- Do not copy the PTF group when a PTF group of the same name already exists on the system, regardless of the levels of the existing PTF group. An error will occur if a PTF group of the same name already exists on the system and PTFGRP(*ALL) is not specified.
- *YES
- Always copy the PTF group regardless of the levels of the existing PTF group of the same name. If the level of the PTF group being copied is lower than all other existing levels of the PTF group, it may be automatically deleted if the number of levels of the PTF group on the system exceeds the current value of the PTFGRPLVL parameter of the CHGSRVA command.
Top |
PTF group level (PTFGRPLVL)
Specifies the level of the PTF group to copy.
Note: This parameter applies only when *SERVICE is specified for the From device (FROMDEV) parameter.
- *INSTALLED
- The latest level of the PTF group that has a status of Installed or Apply at next IPL is copied. If no levels of the PTF group have a status of Installed or Apply at next IPL, the latest level of the PTF group that exists on the system is copied.
- *ALL
- All levels of the PTF group are copied.
- *LATEST
- The latest level of the PTF group that exists on the system is copied.
- 1-99999
- Specify the level of the PTF group to copy.
Top |
Copy related PTF groups (RELPTFGRP)
Specifies whether to copy related PTF groups.
Note: This parameter applies only when *SERVICE is specified for the From device (FROMDEV) parameter.
- *NO
- The related PTF groups named within the specified PTF group are not copied.
- *YES
- All levels of the related PTF groups named within the specified PTF group are copied. All levels of the related PTF groups named within related PTF groups are also copied.
- *INSTALLED
- The latest level of the related PTF groups named within the specified PTF group that have a status of Installed or Apply at next IPL are copied. Any related PTF groups named within related PTF groups are also copied. If there is no level of the related PTF group with a status of Installed or Apply at next IPL, the latest level of the related PTF group that exists on the system is copied.
- *LATEST
- The latest level of related PTF groups named within the specified PTF group is copied. Any related PTF groups named within related PTF groups are also copied.
Top |
Data compression (DTACPR)
Specifies whether data compression is used.
- *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 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.
Note: This parameter applies only when *SERVICE is specified for the From device (FROMDEV) parameter and a tape or optical device name is specified for the To device (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.
Note: This parameter applies only when *YES is specified for the Copy PTFs (CPYPTF) parameter.
- *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.
- character-value
- 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 latest installed level of 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 latest installed level of PTF group named SF99200 and all levels 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 with the same level 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 level &2 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 &5 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 |