View previous topic :: View next topic |
Author |
Message |
tcurrier Intermediate
Joined: 10 Feb 2006 Posts: 188 Topics: 68
|
Posted: Wed Apr 29, 2009 9:14 am Post subject: PDS members - creation dates ? |
|
|
Is there a utility that will tell me the creation date of all members of a PDS ?
Thanks for any help ... |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Apr 29, 2009 9:57 am Post subject: |
|
|
Print Directory of a Partitioned Data Set
myself, I would use the index option of 3.4, and then capture the printout from my ISPF List dataset (after exiting ispf and then reentering.
unfortunately, ISPF PDS statistics are only available if the PDS, during allocation/definition, statistics are on. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Wed Apr 29, 2009 12:14 pm Post subject: |
|
|
Just to clarify, statistics are not set during PDS allocation/definition but rather are dependent on STATS ON setting of the ISPF EDIT profile used during edit. Profile used is generally based on the dataset name LLQ. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity. |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed Apr 29, 2009 12:33 pm Post subject: |
|
|
good point and thx for the clarification, Bill _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
taltyman JCL Forum Moderator

Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Wed Apr 29, 2009 9:08 pm Post subject: |
|
|
Bill Dennis wrote: | Just to clarify, statistics are not set during PDS allocation/definition but rather are dependent on STATS ON setting of the ISPF EDIT profile used during edit. Profile used is generally based on the dataset name LLQ. | and can be altered and as such cannot be trusted. |
|
Back to top |
|
 |
tcurrier Intermediate
Joined: 10 Feb 2006 Posts: 188 Topics: 68
|
Posted: Thu Apr 30, 2009 7:32 am Post subject: |
|
|
A coworker was able to find some REXX code that he wrote a while ago to read a PDS directory, rather than the PDS listing itself.
This code will extract the PDS member creation date (with some manipulation of the input data). It can also be modified to extract the member modification date and the modification time.
Code: | /* REXX */
Trace O
/* For batch, use the following JCL:
//REXX EXEC PGM=IRXJCL,PARM='name.of.rexx.exec'
//SYSEXEC DD DSN=your.rexx.library,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY
//PDS DD DSN=your.pds.name,DISP=SHR,
// DCB=(RECFM=F,DSORG=PS,LRECL=256,BLKSIZE=256)
*/
/* For TSO, use the following ALLOCATE sequence: */
ARG dsn
dsnx = "'"||dsn||"'"
ADDRESS TSO
"ALLOC F(PDS) DA("dsnx") SHR REUSE",
" RECFM(F) DSORG(PS) LRECL(256) BLKSIZE(256)"
ADDRESS TSO "ALLOC FILE(XXRPT)",
"DSNAME('H2501T4.PDSOUT.DIRECT')",
"MOD REUSE"
/*-------------------------------------------------------------------*/
call 2000_cal
/*-------------------------------------------------------------------*/
"EXECIO * DISKR PDS (STEM DIR. FINIS" /* read pds directory */
DO blk = 1 to dir.0
usedbytes = C2D(SUBSTR(dir.blk,1,2))
index = 3 /* skip past used bytes */
DO WHILE index < usedbytes
IF SUBSTR(dir.blk,index,8) = 'FFFFFFFFFFFFFFFF'x THEN
SIGNAL direof
pds2name = SUBSTR(dir.blk,index,8) /* member name */
SAY pds2name /* do-wah-diddy, we're here */
index = index + 11 /* skip past name and ttr */
pds2indc = SUBSTR(dir.blk,index,1)
len = BITAND(pds2indc,'1F'x) /* isolate user data length */
userdata = C2D(len) * 2 /* halfwords to bytes */
if userdata = 30 then
CALL 1000_get_date
index = index + userdata + 1 /* skip past user data */
queue pds2name xdate
ADDRESS TSO "EXECIO 1 DISKW XXRPT"
END
END
direof:
PUSH ''
ADDRESS TSO "EXECIO * DISKW XXRPT (finis"
EXIT
/* ========================================== */
1000_get_date:
cdi = index + 5
cr_date = c2x(substr(dir.blk,cdi,4))
y1 = substr(cr_date,1,2)
y2 = substr(cr_date,3,2)
if y1 = '01' then
yy = 20||y2
else
yy = 19||y2
jdays = substr(cr_date,5,3)
r1 = y2//4
if r1 = 0 then
cal.2 = 29
else
cal.2 = 28
do i = 1 to 12
if jdays > cal.i then
jdays = jdays - cal.i
else
do
dd = jdays
mm = i
i = 12
end
end
xdate = mm||'/'||dd||'/'||yy
RETURN
/* ------------------------ */
2000_cal:
cal.1 = 31
cal.2 = 28
cal.3 = 31
cal.4 = 30
cal.5 = 31
cal.6 = 30
cal.7 = 31
cal.8 = 31
cal.9 = 30
cal.10 = 31
cal.11 = 30
cal.12 = 31
RETURN |
|
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Apr 30, 2009 5:10 pm Post subject: |
|
|
tcurrier,
Hmm isn't it simple using LMMFIND with stats on option? zlc4date and zlm4date have the create date and last modified date
Here is a rexx code from archives
Code: |
/* REXX LIST THE STATISTICS OF GIVEN PDS */
PDSNAME='your pds name' /* GIVE YOUR PDS NAME */
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
END
ADDRESS ISPEXEC "LMCLOSE DATAID("DID")"
ADDRESS ISPEXEC "LMFREE DATAID("DID")"
ADDRESS TSO "FREE F(MYPDS)"
|
|
|
Back to top |
|
 |
tcurrier Intermediate
Joined: 10 Feb 2006 Posts: 188 Topics: 68
|
Posted: Thu Apr 30, 2009 6:45 pm Post subject: |
|
|
Kolusu,
Yes, it does appear to be simple using your example.
Thank you. |
|
Back to top |
|
 |
somuk Beginner
Joined: 04 Feb 2003 Posts: 113 Topics: 37
|
Posted: Thu Sep 24, 2009 5:00 am Post subject: |
|
|
Hi,
I would like to modify the above rexx (tcurrier's solution) to find out the last modified date of each member in the PDS. Can some one please help me.. I'm not able to use Kolusu's solution since this batch job is going to run in zeke and I'm not able to allocate the ISPF profile libraries.. _________________ Regds,
Somu |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Thu Sep 24, 2009 5:55 am Post subject: |
|
|
Just as well that the job does not use any ISPF libraries, so zeke away  _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Sep 24, 2009 8:23 am Post subject: |
|
|
I've used this code from the IBM website with success:
List a PDS directory from the z/OS UNIX tools page. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
|
Back to top |
|
 |
somuk Beginner
Joined: 04 Feb 2003 Posts: 113 Topics: 37
|
Posted: Fri Sep 25, 2009 1:29 am Post subject: |
|
|
Thank you very much superk and semigeezer
Those links are really helpful..!!! _________________ Regds,
Somu |
|
Back to top |
|
 |
|
|