* "NOPE" resurrected. Displays PURGE info, without DOING the purge...
@ 1997-05-09 4:00 Kent C Brodie
1997-05-10 4:00 ` Dale Dellutri
0 siblings, 1 reply; 5+ messages in thread
From: Kent C Brodie @ 1997-05-09 4:00 UTC (permalink / raw)
Based on an earlier post I saw, and also based on the fact that I'm
tossing my VAXes in lieu of some spiffy Alpha's next week....
I recently resurrected the "NOPE" utility. A cute, but VERY handy
system manager tool. Basically, it displays files that _WOULD_ be purged
*IF* you did a purge (and it lets you use wild cards, filespecs, etc).
I'm submitting it to the next generation of the Freeware CD, but if you
want an early copy,
ftp: anonymus ftp-- axp1.cpg.mcw.edu file: nope.bck (or nope.zip)
URL: ftp://www.cpg.mcw.edu/nope.zip
Enjoy.
Long live the SIG tapes!
--
Kent C. Brodie - Systems & Network Manager Internet: <brodie@cpg.mcw.edu>
Medical College of Wisconsin MaBellNet: +1 414 456 5080
Clinical Practice Group (http://www.cpg.mcw.edu/www/staff/brodie.html)
"Keep your hands and feet inside the ride at all times..."
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: "NOPE" resurrected. Displays PURGE info, without DOING the purge...
1997-05-09 4:00 "NOPE" resurrected. Displays PURGE info, without DOING the purge Kent C Brodie
@ 1997-05-10 4:00 ` Dale Dellutri
1997-05-10 4:00 ` Carl Perkins
0 siblings, 1 reply; 5+ messages in thread
From: Dale Dellutri @ 1997-05-10 4:00 UTC (permalink / raw)
In comp.os.vms Kent C Brodie <brodie@cpg.mcw.edu> wrote:
> I recently resurrected the "NOPE" utility. A cute, but VERY handy
> system manager tool. Basically, it displays files that _WOULD_ be purged
> *IF* you did a purge (and it lets you use wild cards, filespecs, etc).
Won't this (not completely tested) com file do what you want?
So for example, you could say
@NOPE *.* "" "/col=1/nohea/notra"
and get a listing (in NOPE.LIS) of all the files in a single
column format without header or trailer.
$! NOPE.COM - Display files that would be purged if you did
$! a PURGE/LOG, but do not delete files
$! Dale Dellutri 1997-05-10
$ say = "WRITE SYS$OUTPUT"
$ if p1 .eqs. ""
$ then
$ say "Usage:"
$ say " @NOPE <p1> <p2> <p3>"
$ say " P1 = filespec (must not contain version number)"
$ say " P2 = name of listing file (default is NOPE.LIS)"
$ say " P3 = qualifiers for DIR command (do not use /LOG)"
$ exit %X10000002
$ endif
$ if p2 .eqs. ""
$ then
$ assign NOPE.LIS sys$output
$ else
$ assign 'p2' sys$output
$ endif
$ i = 1
$dir_loop:
$ dir'p3' 'p1';-'i'
$ if $status .ne. %X00000001 then goto done
$ i = i + 1
$ goto dir_loop
$done:
$ deassign sys$output
$ exit
--
Dale Dellutri <URL:mailto:ddellutr@mcs.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "NOPE" resurrected. Displays PURGE info, without DOING the purge...
1997-05-10 4:00 ` Dale Dellutri
@ 1997-05-10 4:00 ` Carl Perkins
1997-05-11 4:00 ` Glenn C. Everhart
1997-05-12 4:00 ` Dale Dellutri
0 siblings, 2 replies; 5+ messages in thread
From: Carl Perkins @ 1997-05-10 4:00 UTC (permalink / raw)
In article <5l28p1$110$1@Mars.mcs.net>, ddellutr@MCS.COM (Dale Dellutri) writes...
}In comp.os.vms Kent C Brodie <brodie@cpg.mcw.edu> wrote:
}> I recently resurrected the "NOPE" utility. A cute, but VERY handy
}> system manager tool. Basically, it displays files that _WOULD_ be purged
}> *IF* you did a purge (and it lets you use wild cards, filespecs, etc).
}
}Won't this (not completely tested) com file do what you want?
}So for example, you could say
} @NOPE *.* "" "/col=1/nohea/notra"
}and get a listing (in NOPE.LIS) of all the files in a single
}column format without header or trailer.
}
[...]
}$dir_loop:
}$ dir'p3' 'p1';-'i'
}$ if $status .ne. %X00000001 then goto done
}$ i = i + 1
}$ goto dir_loop
}$done:
}$ deassign sys$output
}$ exit
}--
}Dale Dellutri <URL:mailto:ddellutr@mcs.net>
Nope ;-)
At lseast, I expect not. I don't actually have NOPE, but I see problems with
what you have there.
What happens if I want to keep 2 versions of the files, I.E. find out what
files would be deleted if I did a PURGE/KEEP=2? Or perhaps a
PURGE/BEFORE=YESTERDAY? Or both via PURGE/KEEP=2/BEFORE=YESTERDAY?
I expect that NOPE does those cases. If it doesn't, it ought to.
The order that files appear on your list will also be different for a lot of
those cases that work for both. Say your directory has these files in it:
A.A;3 A.A;2 A.A;1
B.B;3 B.B;2 B.B;1
C.C;2 C.C;1
D.D;3 D.D;2 D.D;1
Your .COM file will list these:
A.A;2
B.B;2
C.C;1
D.D;2
A.A;1
B.B;1
D.D;1
Listing the files the way you have it is not as good as listing all the A.A
versions, then all the B.B versions and so on. (I am assuming that this
"grouped by file name" is the order NOPE lists them in - if it isn't, it
should be! It is the order an actual purge uses and it is more informative.)
To get the better order from your current method you'd need to do a sort on
the file name & extender fields, which could get complicated when all the
file names are not the same length and even more so when you have multiple
directories since you want to keep them sorted by directory too. You could
do better using the f$search lexical - of course you could also save yourself
the trouble and go get NOPE (assuming it works the way (I think) it should).
--- Carl
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "NOPE" resurrected. Displays PURGE info, without DOING the purge...
1997-05-10 4:00 ` Carl Perkins
@ 1997-05-11 4:00 ` Glenn C. Everhart
1997-05-12 4:00 ` Dale Dellutri
1 sibling, 0 replies; 5+ messages in thread
From: Glenn C. Everhart @ 1997-05-11 4:00 UTC (permalink / raw)
I noticed that nope.zip did not save VMS attributes when made.
You can however fix the saveset up after unzip with FILE
$ file/type=fixed/record=32256/attr=noimpliedcc nope.bck
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "NOPE" resurrected. Displays PURGE info, without DOING the purge...
1997-05-10 4:00 ` Carl Perkins
1997-05-11 4:00 ` Glenn C. Everhart
@ 1997-05-12 4:00 ` Dale Dellutri
1 sibling, 0 replies; 5+ messages in thread
From: Dale Dellutri @ 1997-05-12 4:00 UTC (permalink / raw)
In comp.os.vms Carl Perkins <carl@gerg.tamu.edu> wrote:
> In article <5l28p1$110$1@Mars.mcs.net>, ddellutr@MCS.COM (Dale Dellutri) writes...
> }In comp.os.vms Kent C Brodie <brodie@cpg.mcw.edu> wrote:
> }> I recently resurrected the "NOPE" utility. A cute, but VERY handy
> }> system manager tool. Basically, it displays files that _WOULD_ be purged
> }> *IF* you did a purge (and it lets you use wild cards, filespecs, etc).
> }
> }Won't this (not completely tested) com file do what you want?
[... old version of com file deleted ... ]
> At lseast, I expect not. I don't actually have NOPE, but I see problems with
> what you have there.
> What happens if I want to keep 2 versions of the files, I.E. find out what
> files would be deleted if I did a PURGE/KEEP=2? Or perhaps a
> PURGE/BEFORE=YESTERDAY? Or both via PURGE/KEEP=2/BEFORE=YESTERDAY?
> I expect that NOPE does those cases. If it doesn't, it ought to.
> The order that files appear on your list will also be different for a lot of
> those cases that work for both. Say your directory has these files in it:
[... some examples deleted ...]
> --- Carl
I can't fix the order of the listing, but this new version covers both
the keep level and before= requirements. I dropped the ability to
write to a file in the com file, just assign sys$output to a file and
deassign it after the com file runs. To get the listing of files
to be deleted if you say PURGE/KEEP=2/BEFORE=YESTERDAY, just say
@NOPE *.* 2 "/BEFORE=YESTERDAY"
DCL is a surprisingly powerful language.
$! NOPE.COM - Display files that would be purged if you did
$! a PURGE/LOG, but do not delete files
$! Dale Dellutri 1997-05-10
$! Version 1.2
$ say = "WRITE SYS$OUTPUT"
$ if p1 .eqs. ""
$ then
$ say "Usage:"
$ say " @NOPE <p1> <p2> <p3>"
$ say " P1 = filespec (must not contain version number)"
$ say " P2 = keep level (default is 1)
$ say " P3 = qualifiers for DIR command (do not use /LOG)"
$ exit %X10000002
$ endif
$ if p2 .eqs. ""
$ then
$ i = 1
$ else
$ i = 'p2'
$ endif
$ on warning then exit
$dir_loop:
$ dir'p3' 'p1';-'i'
$ i = i + 1
$ goto dir_loop
--
Dale Dellutri <URL:mailto:ddellutr@mcs.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1997-05-12 4:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-05-09 4:00 "NOPE" resurrected. Displays PURGE info, without DOING the purge Kent C Brodie
1997-05-10 4:00 ` Dale Dellutri
1997-05-10 4:00 ` Carl Perkins
1997-05-11 4:00 ` Glenn C. Everhart
1997-05-12 4:00 ` Dale Dellutri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox