Article 169665 of 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).
>[...]

I've seen NOPE in the past, and wondered what purpose it really serves.

Incidentally, I'm used to using another tool, called PUCON (old shorthand
for PURGE/CONFIRM) which derives from the time (V3?) when there wasn't a
/CONFIRM qualifier to PURGE. My command procedure asks _once_ for each
"filename" that's a candidate for purging, and if I confirm, does all of
the PURGE, contrary to DCL command invented later, which (most often) 
annoyingly prompts for each single version.

PUCON.COM isn't pretty, but short enough to include it after my .sig ...

Wolfgang J. Moeller, Tel. +49 551 2011516 or -510, moeller@gwdvms.dnet.gwdg.de
GWDG, D-37077 Goettingen, F.R.Germany   |       Disclaimer: No claim intended!
<moeller@decus.decus.de>  ----- <moeller@gwdg.de>  -----  <w.moeller@ieee.org>

----- PUCON.COM ----------------------------------------------------------------
$! PURGE/CONFIRM [filespec]
$! [filespec] may include a negative version number ;-n to mean /KEEP=n
$ ver='f$ver(0,f$env("verify_image"))'
$ on error then goto errex
$ exstat=1556		! ss$_controly (F)
$ on control_y then goto resetver
$!
$ spec=f$parse(p1,"*.*;-1")
$ if spec.eqs."" then goto badp1
$ vers=f$parse(spec,,,"version")
$ if spec.eqs."" then goto badp1
$ versn=vers-";"
$ if versn.eqs."" then goto badp1
$ on warning then goto badp1
$ keepn=-('versn')
$ if keepn.gt.0 then goto keepn_ok
$ goto badp1
$keepn_ok:
$ on error then goto errex
$ keepspec=""
$ if keepn.gt.1 then keepspec="/keep=''keepn'"
$!
$ lastfn=""	! remarkably, if spec isn't a wildcard,
$		! f$sea(spec) never returns the void string
$!
$!*****
$!
$sealoop:
$ fn=f$sea(spec)
$ if fn.eqs."".or.fn.eqs.lastfn then goto done
$ lastfn=fn
$ fvers=f$parse(fn,,,"version")
$ if fvers.nes."" then goto fn_ok
$ write SYS$COMMAND "%PUCON-I-Can't handle ",fn		!! not VMS ??
$ goto sealoop
$fn_ok:
$ fn=(fn+"?")-(fvers+"?")	! use "?" for end of string
$!
$ prom=fn+", purge"+keepspec+" ? [n/y]"
$!
$ ip=0				! double the quotation marks within prompt
$ lp=f$len(prom)
$quo_loop:
$ ir=f$loc("""",f$ext(ip,lp-ip,prom))
$ if ir.eq.(lp-ip) then goto quo_loop_end
$ prom=f$ext(0,ip+ir+1,prom)+""""+f$ext(ip+ir+1,lp-ip-ir-1,prom)
$ ip=ip+ir+2
$ lp=lp+1
$ goto quo_loop
$quo_loop_end:
$!
$ yesno=0
$ inquire yesno "''prom'"
$ if yesno then goto doit
$ goto sealoop
$!
$doit:
$ on error then continue
$ purge/log 'fn' 'keepspec'
$ on error then goto errex
$ goto sealoop
$!
$!*****
$!
$done:
$ exstat=1
$ goto resetver
$!
$badp1:
$ write SYS$COMMAND "%PUCON-E-Bad specification """,p1,""""
$errex:
$ exstat=2
$resetver:
$ exit exstat+%x10000000+(f$ver(ver,f$env("verify_image"))*0)
----- PUCON.COM ----------------------------------------------------------------

Wolfgang J. Moeller, Tel. +49 551 2011516 or -510, moeller@gwdvms.dnet.gwdg.de
GWDG, D-37077 Goettingen, F.R.Germany   |       Disclaimer: No claim intended!
<moeller@decus.decus.de>  ----- <moeller@gwdg.de>  -----  <w.moeller@ieee.org>


