Start of change

Generation numbers explained

Generation numbers are used to identify specific versions of a data set member. When you create a member for the first time, the initial version is assigned a generation number of 0. Generation 0 is referred to as the current generation. All subsequent generations are non-current generations. Generations have two assigned numbers, an absolute value and a relative value.

Absolute numbers

Absolute numbers are positive numbers that are assigned when non-current generations are created and they are not reused. When you create a generation, the current generation (0) is always updated to reflect the newest version. Hence generation 0 is always the newest version. The current version that previously existed is assigned an absolute number of the next available positive number in ascending order. When you delete a non-current generation, absolute numbers are not reused. For example, assume you have three generations numbered 0, 1, and 2. If you delete generation 1, you have a gap in your generations, leaving you with 0 and 2. Creating a new non-current generation results in generations 0, 2, and 3.

Rules for absolute numbers and non-current generations:
  • The first non-current generation is assigned a value of 1.
  • If you create a second non-current generation, it is assigned a value of 2.
  • The highest absolute number assigned to a member is always the most recent non-current generation.
  • If you delete a non-current generation, the absolute number assigned to that generation is removed and is not used again. (0 is the exception to this rule).

Relative numbers

Relative generations are negative numbers that represent the order in which the generations are created and updated. The first non-current generation is assigned a relative number of -1. In fact, anytime you create a new non-current generation it is assigned a value of -1. When you create a non-current generation, all relative numbers of any prior non-current generations are decremented by 1, so -1 becomes -2, -2 becomes -3, and so on. Unlike absolute numbers, there is never a gap in relative numbers as these numbers are not assigned to a particular generation version. As new generations are added or deleted, relative numbers are adjusted to account for the order of most to least recent with -1 always being the most recent. The new generation list panel, ISRUGEN, displays generations by using the relative numbering scheme, which is logically simpler in nature.

Here is an example of how generation numbers would be assigned assuming a total of four generations were created without deletion.

MEMBER (XYZ) Relative Generation Absolute Generation
Current®/Newest 0 0
-1 3
-2 2
Oldest -3 1

Generation 0

It is important to understand that generation 0 is unique in that it is the primary version of the member. If you access the member without specifying a generation number, the generation number defaults to 0.

ISPF does not allow generation 0 to be deleted. However, there are other products that can be used to delete generation 0.

Note:
  • If you delete generation 0, the remaining generations are orphaned.
  • If generation 0 is deleted, the member is not displayed in the member list.
  • If a member has orphaned generations, you can access non-current generations by using option 1, View, or option 2, Edit, and supplying the member name on the panel with an existing non-current generation.
  • If you edit generation -1 of an orphaned member by using option 2, Edit, and then save the generation (SAVE NEWGEN primary command), the editor creates generation 0. As a result, the generations are no longer orphaned.
End of change