Is it possible to get last modified date of PDS members...

Ask/Clarify the questions on TSO, CLIST & REXX

Moderators: Veera, Moderator Group

Post Reply
phaniyelugula
Member
Posts: 20
Joined: Mon Dec 30, 2013 6:03 pm

Is it possible to get last modified date of PDS members...

Post by phaniyelugula » Fri Jan 24, 2014 10:25 am

Hi All,

Is it possible to get last modified dates of PDS members..??

I know, it is possible to get the following details..

Code: Select all

'DATA SET NAME..............:'SYSDSNAME  
'VOLUME SERIAL ID...........:'SYSVOLUME  
'DEVICE TYPE................:'SYSUNIT    
'DATA SET TYPE..............:'SYSDSORG   
'RECORD FORMAT..............:'SYSRECFM   
'RECORD LENGTH..............:'SYSLRECL   
'RECORD BLOCK SIZE..........:'SYSBLKSIZE 
'KEY LENGTH.................:'SYSKEYLEN  
'DATA SET CREATED...........:'SYSCREATE  
'DATA SET LAST REFERENCED...:'SYSREFDATE 
'DATA SET UPDATED...........:'SYSUPDATED 
'DATA SET TYPE(PS/PDS)......:'SYSDSSMS   

But i want to get the last modified date and if possible time too.

Thanks

phaniyelugula
Member
Posts: 20
Joined: Mon Dec 30, 2013 6:03 pm

Post by phaniyelugula » Fri Jan 24, 2014 2:26 pm

Hi..

I have got the solution..

Using LMMFIND we can do it..

Please post, If there is any other easy solution than the below

Code: Select all

/* REXX   LIST THE STATISTICS OF GIVEN PDS                          */
/* GETS THE PDS NAME */
SAY 'ENTER ANY PDS NAME'
PARSE UPPER PULL PDSNAME
ADDRESS TSO "ALLOC F(MYPDS) DA('"PDSNAME"') SHR REU"
ADDRESS ISPEXEC "LMINIT DATAID(DID) DDNAME(MYPDS) ENQ(SHWR)"
ADDRESS ISPEXEC "LMOPEN DATAID("DID") OPTION(INPUT)"
/* RETREIVE MEMBER LIST WITH  LISTDS COMMAND                        */
X = OUTTRAP('VAR.')
"LISTDS '"PDSNAME"' MEMBERS"
X = OUTTRAP('OFF')
DO I = 7 TO VAR.0         /*  PROCESS ALL MEMBERS OF SOURCE PDS     */
   MEM = LEFT(STRIP(SUBSTR(VAR.I,3,8)),8,' ')
   ADDRESS ISPEXEC "LMMFIND DATAID("DID") MEMBER("MEM") STATS(YES)"
   SAY 'MEMBER ' MEM 'WAS CREATED ON : ' ZLC4DATE,
       ' AND IS LAST MODIFIED ON : ' ZLM4DATE ZLMTIME ZLMSEC ,
       ' BY USER ID : ' ZLUSER
END
ADDRESS ISPEXEC "LMCLOSE DATAID("DID")"
ADDRESS ISPEXEC "LMFREE DATAID("DID")"
ADDRESS TSO "FREE F(MYPDS)"

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Fri Jan 24, 2014 2:52 pm

Note that these stats can be modified by an external process and even turned off so should not be relied upon for something important - and if it is not important why is it being done?!
Regards
Nic

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others