Enterprise Tech Journal - 2016: Issue 5
PDSEV2 Member Generations A Technical Introspective
Lionel B. Dyck,William J. Smith 2016-11-18 00:15:37
With z/OS Version 2.1, IBM introduced PDSE Version 2 data sets that support a groundbreaking new feature of Data Facility System Managed Storage (DFSMS) called member generations. They are enabled by Small Programming Enhancement (SPE) APAR OA43952, DFSMS component id 5695DF101, dated Dec. 12, 2013, and ISPF APARs OA42247 and OA42248. Do member generations offer functionally utilitarian value? Seemingly low adoption rates appear to indicate the answer is no. But upon further examination is that conclusion valid? Apparently, a majority of installations have no idea the function exists; and those familiar with member generations remain unaware how to exploit their capabilities. To the ongoing disappointment of its client base, IBM and OEM vendors market very few products that work effectively with them. This article amplifies and critiques IBM’s vision, deployment and exploitation of PDSE member generations by its own products. Moreover, IBM is not the only software developer that chooses to either ignore member generations or tolerates them. By toleration, the authors mean vendors’ products recognize and/or tolerate the existence of member generations or provide minimally inherent exploitation of their capabilities. Vendors that updated their products to fully utilize member generations are to be commended. Notably, these vendors include IBM with Data Set Commander and MacKinney Systems with SimpList. Unfortunately, IBM’s flagship development environment, the TSO-based Interactive System Productivity Facility, ISPF, offers at very best minimal and marginally usable support. The onboard support of member generations by ISPF presumes the user knows in advance the non-intuitive and disjointed path by which to navigate the breadth of the ISPF menu system to locate it. As an example, to access member generations within ISPF, a user must perform the following sequence of tasks: • The enhanced member list option must be selected. • Use ISPF 3.4 DSLIST to list the data set(s) with member generations. • Enter Browse, Edit or View to bring up the enhanced member list. • Enter S in the row selection column, and then enter a / in the Prompt field. • Enter the desired generation in the pop-up window. Later in this article an open source (GPL) ISPF dialog, PDSEGEN, will be discussed. PDSEGEN provides a remarkably robust and visually appealing suite of easily executed functions that extend, supersede and overcome the shortcomings of the implementation within the native ISPF Program Development Facility, PDF. What Are PDSE Member Generations? PDSE member generations is a feature of PDSE Version 2 data sets, which are now referred to as libraries. A PDSE library is allocated with a unique attribute, or setting, known as its maximum generation or MAXGEN with an assigned integral value greater than 0. As a precursor to using PDSE Version 2 data sets, the system programmer or storage administrator must enable member generations on a global, installationwide, basis. This task is accomplished by updating member IGDSMS00 in SYS1.PARMLIB, specifying an installationwide numeric value for the MAXGENS_LIMIT parameter. MAXGENS_LIMIT may be set and/or updated dynamically without the need for an IPL using the SET system command. When—and not if—an installation decides to implement member generations, the system programmer must establish the MAXGENS_ LIMIT setting with a reasonable upper bound. A typical, installationwide suggested range for the upper bound is 10-20 generations. However, IBM specifications permit an installation to define a maximum upper bound of 2,000,000,000 member generations. Once chosen, this setting is not fixed: It is solely based upon anticipated use and is dynamically reconfigurable to meet installation requirements. Member generations are analogous to the Generation Data Group (GDG) data sets available since OS/360 MFT/MVT. Each time a member within a PDSE Version 2 library is updated, the updated member and all records contained therein will be saved as a new generation and member—i.e., a single, pointin- time or backup copy of the original member. Each newly created, point-in-time generation is assigned an absolute generation number from 1 to 2,000,000,000. Note that member generations can only be referenced using ISPF, as described above, or by a product that is member generation “aware” or enabled as such. To reference a member generation, one must use the absolute generation number (e.g., 859) or a relative generation number (e.g., -5). Consequently, the generations can be considered as logical, pointin- time, backup copies or previous versions of the base generation (i.e., generation 0) of a PDSE member within a PDSE Version 2 library. To determine if PDSE Version 2 libraries are enabled on a z/OS system (and if one doesn’t have read access to SYS1.PARMLIB), run the following REXX exec to determine the current MAXGENS_LIMIT: /* REXX */ CVT = C2D(Storage(10,4)) CVTDFA = C2D(Storage(D2X(CVT + 1216),4)) /* CVT + 4c0 */ DFAMGEN = C2D(Storage(D2X(CVTDFA + 76),4)) /* DFA + 4c */ Say ‘System MAXGEN limit is:’ DFAMGEN To allocate in batch a fixed-blocked PDSE with member generations enabled, use JCL similar to the following where hlq.user.pdse is a valid, installation acceptable data set name. Notice the new numeric, positional subparameter within DSNTYPE and the MAXGENS keyword parameters: //ALLOCATE EXEC PGM=IEFBR14 //DD1 DD DSN=hlq.user.pdse, // DSNTYPE=(LIBRARY,2),MAXGENS=5, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920), // UNIT=SYSALLDA,SPACE=(CYL,(1,1,1)),DISP= (NEW,CATLG,DELETE) Similarly, to allocate a PDSE with member generations enabled in the TSO foreground using ISPF 3.2, specify a data set name with a “Data set name type” of Library, a “Data set version” of 2, and “Num of generations” greater than 0 and less than, or equal, to the MAXGENS_LIMIT. Figure 1 illustrates foreground allocation of PDSE member generations within ISPF 3.2. PDSE Member Generations Restrictions Member generations cannot be accessed using JCL or Dynamic Allocation. Custom code must be written to access generations using the DESERV, FIND and STOW macro interfaces. Other restrictions are: • IEBCOPY does not recognize PDSE member generations. A source PDSE Version 2 library containing member generations copied using IEBCOPY will result in a target PDS Version 2 library losing all generations but the base (generation 0) members. • IDCAMS REPRO has the same limitation and restrictions as IEBCOPY. • ISPF Library Services (e.g., LMCOPY) has the same limitation and restrictions. • The TSO TRANSMIT command has the same limitation and restrictions. • IBM’s FTP has the same limitation and restrictions. IBM products DFSMSdss (PGM=ADRDSSU) and DFSMShsm support backup, restore and copying of PDSE Version 2 libraries and member generations as does FDRABR, a suite of products from Innovation Data Processing (http://www.fdr.com/products/fdrabr/). OEM software vendors should be questioned to determine if the current levels of their products include support of PDSE Version 2 libraries and member generations. The PDSEGEN Open Source ISPF Dialog PDSEGEN is a community-supported, open source ISPF dialog governed by a royalty-free, version 3 GNU General Public License (http://www.gnu.org/copyleft/gpl.html). PDSEGEN may be downloaded from the CBT website (http://www.cbttape.org) using file number 312. Check the Updates page for the latest version. PDSEGEN provides comprehensive access and exploitation of PDSE Version 2 member generations within ISPF. PDSEGEN is designed solely to work with PDSE Version 2 data libraries; it does not support load libraries even though member generations are supported by load libraries (the authors are unsure why, given a fundamental inability to access a load module member generation). Upon execution of the PDSEGEN dialog, the initial panel prompts the user for (1) a PDSE data set name, (2) choosing a filter to restrict the list of members to be displayed in the member selection list and (3) changing the default action for the line selection option of “S” (for member SELECTion and also the point-and-shoot/PNTS default). Figure 2 illustrates the PDSEGEN dialog opening panel prompt for a data set name and options. To limit the list of displayed members, PDSEGEN provides a powerful set of filters: • ABC* - filter those members starting with ABC • ABC: - filter those members starting with ABC • *ABC - filter those members ending with ABC • ABC/ - filter those members with ABC anywhere • /ABC - filter those members with ABC anywhere • ABC - filter a single member, ABC. The list of displayed members defaults to all members with the filter OFF. Figure 3 is an example of the principal PDSEGEN panel: the member generations selection list. The PDSEGEN member list display enables point-and-shoot (PNTS) to provide a modern, user-friendly interface. By clicking on a column header, point-and-shoot sorts the contents of the selected column; the most recently sorted column changes color to provide a visual cue reflecting which column was last sorted. In addition, any member can be selected by moving the cursor to its row selection field and pressing enter. Pressing enter will result in the user selected default action occurring—either browse, edit, view or a prompting pop-up window. Figure 4 is the selection panel for base generation options. In contrast, non-0 generations in the member list display have a different supported set of line selection options because of the differences in how member generations are accessed. These differences are illustrated in Figure 5. This pop-up window is also point-andshoot enabled. Note that every point-and- shoot field used in the application will appear underlined. Using point-and-shoot is not required; traditional text data entry is still supported. To provide readers with information on the capabilities of this application, the primary and member selection commands will be discussed below. The list of member selection commands is not a complete list but serves to provide an example of the expansive scope of capabilities available within PDSEGEN. PDSEGEN Primary Commands BACKUP and RESTORE The PDSEGEN BACKUP command provides the ability to backup all members and their generations by converting the PDSE to a PDS/PDSE without generations. All members, and their associated generations, are copied into a backup PDS/ PDSE under new names and an index is created that maps the backup member to its source member or generation. The generated backup PDS/PDSE can be processed by any utility that can process a non-member generation PDS/PDSE (e.g., IEBCOPY, FTP and TSO IDTF TRANSMIT). The PDSEGEN RESTORE command will reconstitute the backup PDS/PDSE into a new PDSE with all the members and generations restored. The relative generation numbers are retained, along with all ISPF statistics. Unfortunately, there is no means to restore the absolute generation number of member generations. CHANGE The PDSEGEN CHANGE, or C, command can be used to close the currently active PDSE and open a new PDSE—without restarting the PDSEGEN dialog. The command can be provided with either a PDSE data set name or an asterisk (*) to change to a PDSE opened previously during the currently active PDSEGEN session. If C ? is entered on the command line, a list of 15 previously used PDSEs will be presented for selection. Use the change command, C, followed by a numeric value that represents a row number for quick access to any of 15 possible data sets in the displayed list. COMPARE When the current version of a member needs to be compared to a previous version—e.g., to determine what has changed—the PDSEGEN COMPARE command allows the user to compare the selected member to any of its existing member generations. For example, to compare the -2 and -1 member generations of a member named $DOC: COMPARE $DOC -2 -1 There is also a line version that compares the selected generation to the base (generation 0) member. COPY The PDSEGEN COPY command will copy all members and their generations into an existing or new PDSE as illustrated in Figure 6. The COPY operation primes the field “From PDSE” with the name of the current PDSE and prompts for the name of a target PDSE. The target data set name will be allocated if the option is changed from N (i.e., No) to Y (i.e., Yes). During allocation, the space and MAXGEN values may be changed. The members and generations to be copied can be limited by a filter. COPY copies all members and their respective generations. The relative generation number will be retained, along with all ISPF statistics, but the absolute generation numbers are lost, as previously mentioned. EDIT If a member name is known, the PDSEGEN EDIT, or E, command followed by the member name will open the base member in the ISPF PDF editor—i.e., EDIT. This feature is provided for those who prefer a fast path to edit a base member. FILTER The FILTER command is used to set the member filter using the previously mentioned options. The OFF option will terminate use of all member name filtering. FIND The FIND command will search all members for the supplied character string. Only those members and generations that match will be in the member list display. PRUNE A very useful PDSEGEN command, PRUNE, can be used to delete any unused or obsolete generations. The PRUNE command will produce a pop-up window as seen in Figure 7. PRUNE honors the active filter and deletes all generations beyond the number of generations requested to be retained. If a PRUNE value of RESET is entered, and which must appear in uppercase, then the base member and all generations will be deleted. In the presence of a large number of members and member generations, PRUNE makes PDSE library member housekeeping much faster than executing individual member delete commands. VALIDATE The PDSEGEN VALIDATE command will invoke IBM’s IEBPDSE utility to validate and subsequently display the IEBPDSE analysis report in ISPF Browse. Individual PDSEGEN Member Selection Commands The member selection commands typically apply to all members and generations; however, there are some that only apply to base members while others apply only to non-0 generation members. BROWSE, EDIT and VIEW The ISPF BROWSE, EDIT and VIEW commands are all supported. EDIT is automatically converted to VIEW because a restriction exists that precludes reference to a non-0 generation using either JCL or dynamic allocation. While ISPF and other ISPF-based products permit editing of non-0 generations, the design of PDSEGEN blocks this behavior: Changing a non-0 generation may imply that it may be accessed outside of PDSEGEN. COMPARE The PDSEGEN COMPARE member selection command will compare the base member to the selected non-0 generation. This command is not supported by the base member. DELETE The PDSEGEN DELETE member selection command will delete the selected member or generation. If a base member is selected, then all of its generations will also be deleted. An ISPF pop-up window validates the deletion request is the intended operation. An ISPF pop-up window validates the deletion request in the intended operation as illustrated by the DELETE confirmation pop-up window in Figure 8. EXECUTE The PDSEGEN EXECUTE line selection command is option X; it will execute the selected member if the member, or generation, is a CLIST or REXX EXEC. MAIL If enabled, the PDSEGEN MAIL line selection command will pass the member or generation to the open source XMITIP application so it can be emailed. For non-0 generations, a temporary work data set will be created so that XMITIP can reference it for processing. XMITIP is available on the CBT website in file 314: http://www.cbttape.org/cbtdowns.htm. PROMOTE On occasion, a PDSEGEN user may find that a base member needs to be replaced by a previous generation. The PROMOTE line selection option simplifies this process: It is only applicable to non-0 generations and will replace a base member with the selected non-0 generation. Promotion causes the base member to become the -1 generation; any other generations will be pushed down the generation path by one generation. RECOVER If the situation arises, when a member generation needs to be referenced by means of JCL or dynamic allocation, the user must reinstate the generation as a real (base) member without replacing the base member. Under these circumstances, the PDSEGEN RECOVER command is used to copy a generation into a new member. Under these circumstances, the PDSEGEN RECOVER command is used to copy a generation into a new member as displayed in Figure 9. RENAME (N) When it is necessary to rename a base member and its generations, use the N command as in reName. N was chosen for RENAME because R is already in use by the RECOVER command. The RENAME target member name specification panel is displayed in Figure 10. The data entry field is primed (filled) with the current member name since a new name is frequently based on the current name. Clearly, the new name must not currently exist; otherwise, the rename will fail. In addition, the base member and all of its generations will be renamed. During the rename process, the relative generation numbers will be retained, but the absolute generation numbers will be lost. SUBMIT To submit a member or generation to the job entry subsystem for background/batch processing, use PDSEGEN option J. USER The PDSEGEN USER command allows entry of any TSO command, CLIST or REXX EXEC to process the selected data set member. The USER command is entered with a forward slash (/) to indicate where in the command to place the fully-qualified (in quotes) data set name. See Figure 11 for passing a base (generation 0) member. To pass a base— generation 0—member the following pop-up window is displayed in a panel as illustrated in Figure 11. In contrast, a pop-up window allows the user to pass a non-0 generation member as illustrated in Figure 12. Notice in Figure 12, the field titled “Selected DSN” in which a non-0 generation was selected. The member is copied into a temporary data set for processing because dynamic allocation cannot reference a non-0 generation. Summary This article demonstrates clearly the member generations feature of IBM’s PDSE Version 2 libraries as functionally productive and useful. Users of IBM’s ISPF Program Development Facility, who edit source code, text and job control language, will profit unequivocally and forthwith— and without the burdensome undertaking and expense of justifying, installing and learning of specialized version control management products. Moreover, the authors encourage and anticipate broader adoption, exploitation and support of member generations by a growing community of mainframe software vendors. Finally, readers are encouraged to explore and use the functionally robust PDSEGEN open source ISPF dialog. ISSUES WITH PDSE VERSION 2 MEMBER GENERATIONS 1. The MAXGENS option defines the number of generations plus 1 for the base or generation 0 members. Thus, a MAXGENS of 10 yields 11 members. 2. Renaming a member leaves the generations under the original name. This will result in this application not seeing the generations for the renamed member unless a new member with the same name is created. NOTE: This application has circumvention for this issue permitting a member rename. 3. Deleting an individual generation will leave a gap in the generations. This is not critical but invites speculation on the rationale behind this behavior. 4. The TSO DELETE command will delete the base member BUT will not delete any generations. The ISPF LMMDEL service will delete the base member and all generations. This application does not use the LMMDEL service; rather, it uses the PDSEGDEL REXX function. If you delete a member and all generations subsequently creating a new member with the same name, then all generations for the new member will start with the previous members’ generation next high generation number. Some ISPF applications do not use LMMDEL to delete members; instead, they use the equivalent of the TSO DELETE command with the same results. 5. The use of IEBCOPY and ISPF copy services, including option 3.3, will not copy any generations. The only IBM application that copies member generations is DFSMSdss (a full data set dump/restore/copy). PDSEGEN does not support copying at this time. 6. If you edit a generation other than 0 and save it, then a new generation is not generated. This only happens when editing generation 0. Consequently, for this reason, PDSEGEN does not allow editing non-0 generations. 7. Restriction: Member generations are inaccessible using JCL or dynamic allocation. 8. To arbitrarily force the PDF editor to build a new generation while editing generation 0, use the top line command SAVE NEWGEN. This is the default behavior of the SAVE command if NEWGEN is omitted or the END command is executed. 9. To prevent creation of a new generation, use the PDF editor command SAVE NOGEN. 10. A partitioned data set that is listed in the master scheduler JCL, either in SYS1.LINKLIB(MSTRJCLxx) or SYS1. PARMLIB(MSTJCLxx), and therefore used during IPL must be a PDS. Examples of such data sets are SYS1.LPALIB, SYS1. NUCLEUS, SYS1.SVCLIB, SYS1.PARMLIB and an initial linklist data set. 11. SYS1.PROCLIB must be a PDS although other procedure libraries may be PDSEs. Lionel B. dyck is a z/oS consulting systems programmer who has developed many open source tools for the z/oS community. He has shared these tools on his website (www.lbdsoftware.com) and on the cBttape (cbttape.org). Among his contributions to the z/oS community are XMItIP and ftPBatch. Email: email@example.com William J. smith, with 42 years as a systems programmer, developer and an M.A. in It education, is recognized as a passionate college instructor, mentor, mainframe evangelist, technical writer and SMP/E packaging SME. He served 11 years as IBM lead representative to SHArE for dfSMS storage development. Email: firstname.lastname@example.org
Published by Enterprise Systems Media. View All Articles.