Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Updating Data Sets Within a Specified Time Frame

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Wed Jun 20, 2012 7:53 pm    Post subject: Updating Data Sets Within a Specified Time Frame
Reply with 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. 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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Jun 20, 2012 7:57 pm    Post subject: Reply to: Updating Data Sets Within a Specified Time Frame
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1458
Location: Azeroth

PostPosted: Thu Jun 21, 2012 12:22 am    Post subject:
Reply with quote

Hello,
You could read the directory stats using REXX
http://www.sillysot.com/ftp/mlrexx.txt

With reference to the topic http://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
View user's profile Send private message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Thu Jun 21, 2012 12:39 am    Post subject: Re: Updating data sets within a specified time frame
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 2 Thu Jan 19, 2017 1:31 am
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us