Dave Ford
Dave Ford

Reputation: 363

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

Upvotes: 1

Views: 242

Answers (4)

Steve Ives
Steve Ives

Reputation: 8134

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

Upvotes: 4

Lionel B Dyck
Lionel B Dyck

Reputation: 696

If you are using a PDSE and have member generations enabled then you can compare the current generation to the prior generation. You will need a tool to do that as ISPF does not natively support this compare concept with generations.

You can get a free, open-source, tool called PDSEGEN that would allow you to enter on the ISPF Edit command line 'compare -1' and you can then see easily what changed.

PDSEGEN can be found at https://github.com/lbdyck/pdsegen or at https://www.cbttape.org in file 969 (always check the updates page for the latest if you go to the cbttape site).

hope this helps

Upvotes: 2

Milos Lalovic
Milos Lalovic

Reputation: 554

There is no way to tell which lines were changed by looking at the file. The number in far-right of the screen is likely a sequence number. If other lines in your file do not have similar numeric values it is likely that your profile is set to NUMEBR OFF.

To see your profile type prof command on the ISPF editor command line, it should display information similar to this:

> Command ===> prof                                            Scroll ===> CSR  
****** ***************************** Top of Data ******************************
=PROF> ....C (FIXED - 80)....RECOVERY ON....NUMBER ON STD......................
=PROF> ....CAPS OFF....HEX OFF....NULLS ON STD....TABS OFF.....................
=PROF> ....AUTOSAVE ON....AUTONUM ON....AUTOLIST OFF....STATS ON...............
=PROF> ....PROFILE UNLOCK....IMACRO NONE....PACK OFF....NOTE ON................
=PROF> ....HILITE C LOGIC PAREN CURSOR FIND MARGINS(1,72)......................

That will tell you if sequence numbers are ON or OFF. If you want to get rid of sequence numbers you can use do the following sequence of commands: num followed by unnum command, otherwse if you want sequence nymbers use just the num command.

Upvotes: 1

cschneid
cschneid

Reputation: 10775

Those characters in positions 72 - 80 are not necessarily dates. They could be, but if they are it's because someone manually made that true. ISPF Edit does not enforce that.

It's more likely that at some point someone turned NUMBER ON on the member, or that some of the lines were copied from another member that at some point had NUMBER ON turned on.

To your question, it is common for HSM backups to be made of datasets when they are changed. You may be able to recover a recent backup of your PDSE to a different name and then use the compare ISPF Edit primary command to compare the two versions and determine what changed.

Upvotes: 1

Related Questions