HP3000-L Archives

May 2003, 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:
Andreas Schmidt <[log in to unmask]>
Reply To:
Andreas Schmidt <[log in to unmask]>
Date:
Wed, 21 May 2003 09:54:25 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (187 lines)
Hi Donna,

it's also "easy" to create an own LISTF format for MPEX:
you may manipulate an existing format like the DATESORT on (in
LISTF.VECSL).
Following statements are needed:
in the beginning section:
VAR TAGE: INTEGER;
in the Output section (per file):
BEGIN
TAGE:=TODAY-CREDATE
...
END
and change the output format for the additional column. I eliminated the
RESTORE column.
My final QUick&dirty new listf format DAYSOLD looks alike:

(* LISTF sorted by DAYS OLD                                 *)
(* This is a LISTF mode based upon MPEX's mode 3 that is    *)
(* sorted by creation    date.  After each "date" break,    *)
(* a seperator line is printed.  This listing is useful for *)
(* determining WHICH files should be examined first when    *)
(* disk space must be reclaimed.                            *)
VAR TAGE: INTEGER;
MPEXHEADER1:=
"     F I L E   N A M E     CODE  DAYS OLD ACCESS      MODIFY      "+
"CREATION";
MPEXHEADER2:="";
MPEXHEADER3:="";
FOR RFILE IN MPEXFILESET
   SORT (CREDATE,MODDATE,ACCDATE)
   PAGEHEAD BEGIN
      WRITELN (' ');
      WRITELN('%LISTF ',
              SVAR("MPEXFILESET"),
              ',(sorted by age)');
      WRITELN (MPEXHEADER1);
      WRITELN (' ');
   END
   DO
BEGIN
TAGE:=TODAY-CREDATE;
      WRITELN (FILE:8,
               '.':1, GROUP:8,
               '.':1, ACCOUNT:9,
               CODE:6,
TAGE:4,
' ':5,
               ACCDATE:'%0D %1M %0Y   ',
               MODDATE:'%0D %1M %0Y   ',
               CREDATE:'%0D %1M %0Y   '
               )
END
   ONBREAKAFTER 1
      WRITELN (79*'-')
   ;


And an example in MPEX:
%LISTF @,DAYSOLD.SCHMIDA    <== that's my test group in SYS
%LISTF @,(sorted by age)
     F I L E   N A M E     CODE  DAYS OLD ACCESS      MODIFY      CREATION

-------------------------------------------------------------------------------
XWIM    .SCHMIDA .SYS            1034     29 MAY 02   21 JUL 00   21 JUL 00
-------------------------------------------------------------------------------
LASTBOOT.SCHMIDA .SYS            1029     29 MAY 02   26 JUL 00   26 JUL 00
REMOTE  .SCHMIDA .SYS            1029     29 MAY 02   26 JUL 00   26 JUL 00
WHO     .SCHMIDA .SYS            1029     29 MAY 02   26 JUL 00   26 JUL 00
WHOX    .SCHMIDA .SYS            1029     29 MAY 02   26 JUL 00   26 JUL 00
-------------------------------------------------------------------------------
SSIP    .SCHMIDA .SYS            1006     29 MAY 02   18 AUG 00   18 AUG 00
-------------------------------------------------------------------------------
PROFLIST.SCHMIDA .SYS            1002     29 MAY 02   22 AUG 00   22 AUG 00
-------------------------------------------------------------------------------
OUT0384 .SCHMIDA .SYS             986     29 MAY 02   07 SEP 00   07 SEP 00
OUTTRACE.SCHMIDA .SYS             986     29 MAY 02   07 SEP 00   07 SEP 00
-------------------------------------------------------------------------------
...
... snipped ...
...
-------------------------------------------------------------------------------
OB030512.SCHMIDA .SYS               9     12 MAY 03   12 MAY 03   12 MAY 03
-------------------------------------------------------------------------------
OB030513.SCHMIDA .SYS               8     13 MAY 03   13 MAY 03   13 MAY 03
-------------------------------------------------------------------------------
OB030514.SCHMIDA .SYS               7     14 MAY 03   14 MAY 03   14 MAY 03
-------------------------------------------------------------------------------
OB030515.SCHMIDA .SYS               6     15 MAY 03   15 MAY 03   15 MAY 03
-------------------------------------------------------------------------------
OB030516.SCHMIDA .SYS               5     16 MAY 03   16 MAY 03   16 MAY 03
-------------------------------------------------------------------------------
OB030517.SCHMIDA .SYS               4     17 MAY 03   17 MAY 03   17 MAY 03
-------------------------------------------------------------------------------
OB030518.SCHMIDA .SYS               3     18 MAY 03   18 MAY 03   18 MAY 03
-------------------------------------------------------------------------------
JRQPROC .SCHMIDA .SYS               2     19 MAY 03   19 MAY 03   19 MAY 03
OB030519.SCHMIDA .SYS               2     19 MAY 03   19 MAY 03   19 MAY 03
-------------------------------------------------------------------------------
OB030520.SCHMIDA .SYS               1     20 MAY 03   20 MAY 03   20 MAY 03
X970    .SCHMIDA .SYS               1     20 MAY 03   20 MAY 03   20 MAY 03
-------------------------------------------------------------------------------
DATEOLD8.SCHMIDA .SYS      176      0     21 MAY 03   21 MAY 03   21 MAY 03
DAYSOLD .SCHMIDA .SYS      171      0     21 MAY 03   21 MAY 03   21 MAY 03
DAYSOLD8.SCHMIDA .SYS      176      0     21 MAY 03   21 MAY 03   21 MAY 03
OB030521.SCHMIDA .SYS               0     21 MAY 03   21 MAY 03   21 MAY 03
-------------------------------------------------------------------------------

Finally, you can copy the executable DAYSOLD into LISTF.VESOFT, and from
now you can say
LISTF <fileset>,daysold
and you will get the list.

Will this help ?

Best regards,
Andreas Schmidt
CSC Managed Services GmbH
Global Infrastructure Services, Global Processing Engineering Services
DuPont-Strasse 1, Room 1-346
D-61352 Bad Homburg
Germany
Phone: +49 (0) 6172 / 87-2117 Fax -2195   DUCOM x951-2117
eMail: [log in to unmask]
HP e3000 Intranet Information at http://web1.cscbhg.dupont.com/web/hp3000/
Unix Intranet Information at http://bhghpx12.bhg.dupont.com/


----------------------------------------------------------------------------------------

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
----------------------------------------------------------------------------------------





                      Donna Garverick
                      <dgarverick              To:      [log in to unmask]
                      @longs.com>              cc:
                      Sent by: HP-3000         Subject: [HP3000-L] determining a file's age
                      Systems
                      Discussion
                      <HP3000-L


                      05/20/03 11:37
                      PM
                      Please respond
                      to Donna
                      Garverick






hi again!

does anyone have a (scripted) way of calculating a file's
age (based on creation date)?  the question i'm trying to
answer is 'if a file is more than 30 days old,
then....'           - d

--
Donna Garverick     Sr. System Programmer
925-210-6631        [log in to unmask]

Come, my friends, 'Tis not too late to seek a newer world.
Tho' much is taken, much abides; and tho'
We are not now that strength which in old days
Moved earth and heaven, that which we are, we are.
"Ulysses", A. Tennyson

>>>MY opinions, not Longs Drug Stores'<<<

* 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