Search code examples
datasetmainframezosispf

What line changed in a PDSE member?


Earlier today, I changed a source-member in a PDSE in z/OS 2.2. I can see from Data Set List Utility that it was changed by me today.

      Name     Prompt       Size   Created          Changed          ID   
     MYPROGRM                 50  2021/09/08  2022/07/26 11:44:03   MYUSRID

When browsing the source-member, I can see that some of the lines have a date on the far-right side of the screen, but they don't appear to be consistent. If I manually change a line, it doesn't always update that date.

    RUNSTATS TABLESPACE XXXX.YYYYYY                                                
      TABLE(ALL) INDEX(ALL)                                                00011004
      SHRLEVEL REFERENCE                                                           

Is there any way to tell what lines of my PDSE member where changed (for instance) today?

Thank you for your help!

Dave


Solution

  • You might be able to see what lines were changed or added but not deleted. If you have 'STATS ON' and sequence numbers on for the member you are editing, then the sequence numbers on the far right of the screen correspond to the MM values for the member:

    VV.MM Version number and modification level. The version number is set to 1 and the modification level is set to 0 when the member is created. The modification level is the number of times this version has been modified. For example, 02.15 means version 2, modification 15. If a member name is just an alternate name for another member, ALIAS appears in this field.

    https://www.ibm.com/docs/en/zos/2.2.0?topic=statistics-member-list-display-panel-fields

    The standard sequence field is the last 8 characters for fixed-length records, or the first 8 characters for variable-length records, regardless of the programming language. Use NUMBER ON STD to generate sequence numbers in the standard sequence field. For members of partitioned data sets, the format of standard sequence numbers depends on whether statistics are being generated. If statistics are being generated, standard sequence numbers are 6 digits followed by a 2-digit modification level number. The level number flag reflects the modification level of the member when the line was created or last changed. If, for example, a sequence number field contains 00040002, the line was added or last changed at modification level 02. The sequence number is 000400.

    If STATS mode is off, or if you are editing a sequential data set, standard sequence numbers are 8 digits, right-justified within the field.

    https://www.ibm.com/docs/en/zos/2.1.0?topic=numbers-sequence-number-format-modification-level

    So if this is true for the member you are editing, and you want to know what was a changed in the last edit session, then check the Modification level of the member in question in the member display list (you may have to scroll left or right):

                Name     Prompt       Size    Init     Mod      VV MM          ID
     _________ TEST     *Edited          8       7       2      01.02        JOCS065
               **End**  
     
    

    aadn you can see the 00, 01, 02 etc. MM levels in columns 79-80

    ****** ***************************** Top of Data ******************************
     000100 my data                                                         00010000
     000200 my data                                                         00020000
     000300 my data                                                         00030000
     000400 my data                                                         00040000
     000500 my data                                                         00050000
     000510 more data                                                       00051001
     000600 my changed data                                                 00060002
     000700 my data                                                         00070000
     ****** **************************** Bottom of Data ****************************
    

    so to see only what was last changed (useful in a large dataset), get the MM level (e.g. 45) and then, when editing or viewing, run the commands x all;f '45' 79 all