|
View previous topic :: View next topic
|
| Author |
Message |
Charles Wolters
New User
Joined: 30 Mar 2011 Posts: 48 Location: United States
|
|
|
|
I have a partitioned data set and within it I have slightly over 200 members. I would like to identify those members that have not been updated in the last 180 days. Once I have the list of those members I would process those data sets with a generic updating program (in SAS). If I look at the catalog information I can see the DATE LAST REFERENCED. Can I use some TSO utility to construct the list? Once the list is constructed and hopefully the DATE LAST REFERENCED is included on the data sets in the list, how would I be able to reference the date information? I am not sure I am taking the right tack here so any assistance would be appreciated. In UNIX the find command with its options provide a straightforward solution.
Charles Wolters (AKA CW) |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
|
|
| Quote: |
I have a partitioned data set and within it I have slightly over 200 members.
I would like to identify those members that have not been updated in the last 180 days ..... |
the <change> date for a PDS/PDSE member is available only if the ISPF statistics are turned on,
but even that info is not foolproof, statistics reset, delete ...
the only reasonably foolproof way is to use a CM tool. |
|
| Back to top |
|
 |
vasanthz
Global Moderator

Joined: 28 Aug 2007 Posts: 1753 Location: Tirupur, India
|
|
|
|
Hello,
You could read the directory stats using REXX
www.sillysot.com/ftp/mlrexx.txt
With reference to the topic www.ibmmainframes.com/viewtopic.php?t=56107&highlight=
I translated the above REXX code in SAS, you could use the below program and then build the logic with modified date variable as per your requirement.
| Code: |
DATA WELLS;
INFILE 'THE.PDS.UNDER.CONSIDERATION' LRECL=256 BLKSIZE=256;
LENGTH BLOCK1 BLOCK2 BLOCK3 $256 STATS $30 NAME $8 TTR $3 USERID $8;
DROP BLOCK1 BLOCK2 BLOCK3 STATS;
INPUT @1 BLOCK1 $256.;
BL1 = INPUT(SUBSTR(BLOCK1,1,2),PIB2.); /* BLOCK LENGTH */
DO START_POS = 3 TO BL1-1 BY 42; /* PARSE ALL DATA PARTS */
BLOCK2 = SUBSTR(BLOCK1,START_POS); /* BLOCK LENGTH PART REMOVED */
NAME = SUBSTR(BLOCK2,1,8); /* MEMBER NAME */
IF NAME='FFFFFFFFFFFFFFFF'X THEN LEAVE; /* EMPTY DIRECTORY ENTRY */
TTR = SUBSTR(BLOCK2,9,3); /* DON'T KNOW */
C = INPUT(SUBSTR(BLOCK2,12,1),PIB1.); /* CHECK BYTE */
IF C NE 15 THEN ABORT RETURN 12; /* CHECK IF BYTE IS 15 */
BLOCK3 = SUBSTR(BLOCK2,13); /* STATISTICS PART */
STATS = SUBSTR(BLOCK3,1,30); /* MEMBER STATISTICS */
CRECC = INPUT(SUBSTR(STATS,5,1),PIB1.) + 19; /* CREATED CENTURY */
CRDATE = INPUT(SUBSTR(STATS,6,3),PD3.); /* CREATED DATE */
USERID = SUBSTR(STATS,21,8); /* USERID */
VV = INPUT(SUBSTR(STATS,1,1),PIB1.); /* VV-INFO */
MM = INPUT(SUBSTR(STATS,2,1),PIB1.); /* MM-INFO */
FLAGS = INPUT(SUBSTR(STATS,3,1),PIB1.); /* SCLM FLAG */
MOCC = INPUT(SUBSTR(STATS,9,1),PIB1.) + 19; /* MODIFIED CENTURY */
MODATE = INPUT(SUBSTR(STATS,10,3),PD3.); /* MODIFIED DATE */
MODHH = INPUT(SUBSTR(STATS,13,1),PIB1.); /* MODIFIED HOUR */
MODMM = INPUT(SUBSTR(STATS,14,1),PIB1.); /* MODIFIED MINS IN HEX */
MODSS = INPUT(SUBSTR(STATS,4,1),PIB1.); /* MODIFIED SECS */
LINES = INPUT(SUBSTR(STATS,15,2),PIB2.); /* NUMBER OF LINES */
INIT = INPUT(SUBSTR(STATS,17,2),PIB2.); /* INITIAL LINES */
MODLIN = INPUT(SUBSTR(STATS,19,2),PIB2.); /* MODIFIED LINES */
FORMAT MODMM HEX2.;
OUTPUT;
END;
RUN; |
Hope it helps. |
|
| Back to top |
|
 |
Charles Wolters
New User
Joined: 30 Mar 2011 Posts: 48 Location: United States
|
|
|
|
Vasanth,
Hey, this is really cool!! Let me take a closer look at this but it appears that once you can input the directory stats as a record and then parse the record for the individual statistics you are good to go. Thanks again.
Charles |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|