IBM released PDSE Member Generations for PDSE Version 2 over a decade ago. In late 2021 IEBCOPY finally was enabled to copy the member generations with APAR OA60639 for z/OS 2.3, 2.4, and 2.5. In March of 2022 IBM released APAR OA61930 that resolved a SOC4 when IEBCOPY was used to copy a PDSE with a large number of members and member generations.
This is admirable BUT the implementation can be confusing and could potentially cause problems, which I will explain below:
1. Copy of members, with member generations, from one PDSE to a new PDSE is perfect.
2. Copy of unique members, with member generations, from one PDSE to an existing PDSE is perfect.
3. Copy of non-unique members, with member generations, without REPLACE from one PDSE to another will not copy any non-unique members.
4. Copy of non-unique members, with member generations, with REPLACE from one PDSE to another will surprise the user by:
- deleting the target PDSE non-unique members and ALL member generations
- then copying from the source PDS the non-unique members and their member generation
The result of (4) is that the existing members, and member generations, within the target PDSE will be lost.
The expected processing would be for the non-unique members, and their member generations, to be copied into the target PDSE thus:
- Copy all member generations to the target PDSE as new member generations while keeping the base (non-generation) member in the target PDSE alone.
- Copy the base (non-generation) member over making the target PDSE base member the -1 member generation
Copy all members and generations from the source to the target adding the members and generations to the target leaving all existing generations
This way, depending on the maximum number of allowed member generations in the target PDSE, no data is lost.