HP3000-L Archives

November 2013, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Francois Desrochers <[log in to unmask]>
Reply To:
Francois Desrochers <[log in to unmask]>
Date:
Tue, 19 Nov 2013 16:22:39 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (1 lines)
Chuck,



How about doing a LISTF and use PRINT to select all but the last 5 into another file (PTPURGE):



LISTF PT#####,6;PTFILES

PRINT PTFILES;END=-6;OUT=PTPURGE



You could massage PTPURGE and turn each line into a PURGE. It has been a while since I used MPEX but maybe it has an indirect file function e.g. %PURGE ^PTPURGE.



Good luck.

François



-----Message d'origine-----

De : HP-3000 Systems Discussion [mailto:[log in to unmask]] De la part de Chuck Lowe

Envoyé : Tuesday, November 19, 2013 10:18 AM

À : [log in to unmask]

Objet : [HP3000-L] Mpe: Delete all but last 5 records



On our HP3000 (937) I need a routine that will delete all but the last 5 files in a group that begin with certain values and have certain pattern to the file names.



Example:



We keep old copies of our PowerHouse dictionaries but only need the last 5. I can not do it by date like other groups of files since it does not get changed everyday. Sometimes we'll go weeks, even months before we make a change. 



I do have a routine for other groups of files (interface files) that get created everyday and keep only the last 31 days. This is done very easily with MPEX (by VESOFT) by simply checking the create date. 



I was wondering if anyone has a routine either in JCL or MPEX that will keep the last 5 instances of these files. 



The 2 file naming conventions are 



PT###### and PL######



The ###### represent MMDDHH (month, day, hour). As I said in this case the time frame is not an issue. Keeping the last 5 versions is what I need to do. 



* To join/leave the list, search archives, change list settings, *

* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *



* To join/leave the list, search archives, change list settings, *

* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


ATOM RSS1 RSS2