Re: Easy DCL question PURGE vs. DELETE - VMS

This is a discussion on Re: Easy DCL question PURGE vs. DELETE - VMS ; Doug Phillips wrote on 08/07/2007 04:15:30 PM: > On Aug 7, 2:49 pm, bri...@encompasserve.org wrote: > > In article > 006A3...@metso.com>, norm.raph...@metso.com writes: > > > > > > > > > bri...@encompasserve.org wrote on 08/07/2007 02:10:59 PM: > > ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Easy DCL question PURGE vs. DELETE

  1. Re: Easy DCL question PURGE vs. DELETE




    Doug Phillips wrote on 08/07/2007 04:15:30 PM:

    > On Aug 7, 2:49 pm, bri...@encompasserve.org wrote:
    > > In article
    > 006A3...@metso.com>, norm.raph...@metso.com writes:
    > >
    > >
    > >
    > > > bri...@encompasserve.org wrote on 08/07/2007 02:10:59 PM:

    > > [snip]
    > > >> Interaction of /KEEP with /BEFORE, /SINCE, /BY_OWNER, /EXCLUDE, etc:

    > >
    > > >> PURGE will always retain the highest existing file version

    regardless
    > > >> of any file selection criteria or /KEEP[=n] qualifier.

    > >
    > > >> PURGE will always retain all file versions that fail to match the
    > > >> file selection criteria. The only versions that are candidates for
    > > >> deletion are those that match all specified criteria.

    > >
    > > >> If /KEEP=1 or /KEEP is specified or defaulted along with one or more
    > > >> file selection criteria then the retention of the highest existing
    > > > version
    > > >> satisfies the /KEEP qualifier. All lower versions that match the
    > > >> selection criteria will be purged.

    > >
    > > >> If /KEEP=n is specified with n>1 along with one or more selection
    > > >> criteria then in addition to the highest existing file version,
    > > >> the next n-1 versions that match the selection criteria and
    > > >> would thus have otherwise been purged will instead be retained.
    > > >> All lower versions that match the selection criteria will be purged.

    > >
    > > [snip]
    > > > So if I have this and use

    > >
    > > > PURGE/BEFORE="2-AUG-2007" FOO.BAR

    > >
    > > > FOO.BAR;15 7-AUG-2007 14:30:02.26
    > > > FOO.BAR;14 7-AUG-2007 12:30:02.51
    > > > FOO.BAR;13 7-AUG-2007 10:30:01.54
    > > > FOO.BAR;12 7-AUG-2007 06:30:03.77
    > > > FOO.BAR;11 6-AUG-2007 12:30:01.07
    > > > FOO.BAR;10 6-AUG-2007 10:30:02.25
    > > > FOO.BAR;9 6-AUG-2007 06:30:04.56
    > > > FOO.BAR;8 3-AUG-2007 12:30:01.06
    > > > FOO.BAR;7 3-AUG-2007 10:30:02.01
    > > > FOO.BAR;6 3-AUG-2007 06:30:03.75
    > > > FOO.BAR;5 2-AUG-2007 12:30:01.21
    > > > FOO.BAR;4 2-AUG-2007 10:30:02.12
    > > > FOO.BAR;3 2-AUG-2007 06:30:02.62
    > > > FOO.BAR;2 1-AUG-2007 12:30:01.11
    > > > FOO.BAR;1 1-AUG-2007 10:30:01.56

    > >
    > > > will versions 2 and 1 be deleted, or
    > > > just version 1?

    > >
    > > Playing fair and making the prediction before testing it...
    > >
    > > Both versions 2 and 1 will be deleted.
    > >
    > > /KEEP is not specified. That means /KEEP=1
    > > Version 15 is the highest existing version. It is retained.
    > > That satisfies the /KEEP count.
    > > All lower versions matching the /BEFORE will be deleted.
    > > That means versions 2 and 1.
    > >
    > > And the test...
    > >
    > > Directory EISNER$DRA3:[DECUSERVE_USER.BRIGGS]
    > >
    > > FOO.BAR;19 7-AUG-2007 14:44:53.51
    > > FOO.BAR;18 7-AUG-2007 14:44:52.69
    > > FOO.BAR;17 7-AUG-2007 14:44:51.57
    > > FOO.BAR;16 7-AUG-2007 14:44:50.87
    > > FOO.BAR;15 7-AUG-2007 14:44:48.31
    > > FOO.BAR;14 7-AUG-2007 14:44:47.52
    > > FOO.BAR;13 7-AUG-2007 14:44:46.96
    > > FOO.BAR;12 7-AUG-2007 14:44:46.37
    > > FOO.BAR;11 7-AUG-2007 14:44:45.72
    > > FOO.BAR;10 7-AUG-2007 14:44:44.24 ! Not matching
    > > FOO.BAR;9 7-AUG-2007 14:44:43.24 ! Matching
    > > FOO.BAR;8 7-AUG-2007 13:01:12.37 ! Matching
    > >
    > > Total of 12 files.
    > > $ purge foo.bar /before=14:44:44 /log
    > > %PURGE-I-FILPURG, EISNER$DRA3:[DECUSERVE_USER.BRIGGS]FOO.BAR;9 deleted

    (0
    > > blocks
    > > )
    > > %PURGE-I-FILPURG, EISNER$DRA3:[DECUSERVE_USER.BRIGGS]FOO.BAR;8 deleted

    (0
    > > blocks
    > > )
    > > %PURGE-I-TOTAL, 2 files deleted (0 blocks)
    > > $
    > >
    > >

    >
    > Yes, and the logic is:
    >
    > FOO.BAR;19 7-AUG-2007 14:44:53.51 !new file; keep highest version;
    > count=1
    > FOO.BAR;18 7-AUG-2007 14:44:52.69 !no match; skip
    > FOO.BAR;17 7-AUG-2007 14:44:51.57 !no match; skip
    > FOO.BAR;16 7-AUG-2007 14:44:50.87 !no match; skip
    > FOO.BAR;15 7-AUG-2007 14:44:48.31 !no match; skip
    > FOO.BAR;14 7-AUG-2007 14:44:47.52 !no match; skip
    > FOO.BAR;13 7-AUG-2007 14:44:46.96 !no match; skip
    > FOO.BAR;12 7-AUG-2007 14:44:46.37 !no match; skip
    > FOO.BAR;11 7-AUG-2007 14:44:45.72 !no match; skip
    > FOO.BAR;10 7-AUG-2007 14:44:44.24 !no match; skip
    > FOO.BAR;9 7-AUG-2007 14:44:43.24 !Match; incr count;
    > count.gt.keep; delete
    > FOO.BAR;8 7-AUG-2007 13:01:12.37 !Match; incr count;
    > count.gt.keep; delete
    >
    > If you added: /KEEP=2 only FOO.BAR;8 would be deleted. /KEEP=3 and
    > nothing would be deleted.
    >
    >

    Aha! ...but that's illogical. No wonder folks are conflicted.


  2. Re: Easy DCL question PURGE vs. DELETE

    On Aug 7, 3:53 pm, norm.raph...@metso.com wrote:
    > Doug Phillips wrote on 08/07/2007 04:15:30 PM:
    >
    >
    >
    > > On Aug 7, 2:49 pm, bri...@encompasserve.org wrote:
    > > > In article
    > > 006A3...@metso.com>, norm.raph...@metso.com writes:

    >
    > > > > bri...@encompasserve.org wrote on 08/07/2007 02:10:59 PM:
    > > > [snip]
    > > > >> Interaction of /KEEP with /BEFORE, /SINCE, /BY_OWNER, /EXCLUDE, etc:

    >
    > > > >> PURGE will always retain the highest existing file version

    > regardless
    > > > >> of any file selection criteria or /KEEP[=n] qualifier.

    >
    > > > >> PURGE will always retain all file versions that fail to match the
    > > > >> file selection criteria. The only versions that are candidates for
    > > > >> deletion are those that match all specified criteria.

    >
    > > > >> If /KEEP=1 or /KEEP is specified or defaulted along with one or more
    > > > >> file selection criteria then the retention of the highest existing
    > > > > version
    > > > >> satisfies the /KEEP qualifier. All lower versions that match the
    > > > >> selection criteria will be purged.

    >
    > > > >> If /KEEP=n is specified with n>1 along with one or more selection
    > > > >> criteria then in addition to the highest existing file version,
    > > > >> the next n-1 versions that match the selection criteria and
    > > > >> would thus have otherwise been purged will instead be retained.
    > > > >> All lower versions that match the selection criteria will be purged.

    >
    > > > [snip]
    > > > > So if I have this and use

    >
    > > > > PURGE/BEFORE="2-AUG-2007" FOO.BAR

    >
    > > > > FOO.BAR;15 7-AUG-2007 14:30:02.26
    > > > > FOO.BAR;14 7-AUG-2007 12:30:02.51
    > > > > FOO.BAR;13 7-AUG-2007 10:30:01.54
    > > > > FOO.BAR;12 7-AUG-2007 06:30:03.77
    > > > > FOO.BAR;11 6-AUG-2007 12:30:01.07
    > > > > FOO.BAR;10 6-AUG-2007 10:30:02.25
    > > > > FOO.BAR;9 6-AUG-2007 06:30:04.56
    > > > > FOO.BAR;8 3-AUG-2007 12:30:01.06
    > > > > FOO.BAR;7 3-AUG-2007 10:30:02.01
    > > > > FOO.BAR;6 3-AUG-2007 06:30:03.75
    > > > > FOO.BAR;5 2-AUG-2007 12:30:01.21
    > > > > FOO.BAR;4 2-AUG-2007 10:30:02.12
    > > > > FOO.BAR;3 2-AUG-2007 06:30:02.62
    > > > > FOO.BAR;2 1-AUG-2007 12:30:01.11
    > > > > FOO.BAR;1 1-AUG-2007 10:30:01.56

    >
    > > > > will versions 2 and 1 be deleted, or
    > > > > just version 1?

    >
    > > > Playing fair and making the prediction before testing it...

    >
    > > > Both versions 2 and 1 will be deleted.

    >
    > > > /KEEP is not specified. That means /KEEP=1
    > > > Version 15 is the highest existing version. It is retained.
    > > > That satisfies the /KEEP count.
    > > > All lower versions matching the /BEFORE will be deleted.
    > > > That means versions 2 and 1.

    >
    > > > And the test...

    >
    > > > Directory EISNER$DRA3:[DECUSERVE_USER.BRIGGS]

    >
    > > > FOO.BAR;19 7-AUG-2007 14:44:53.51
    > > > FOO.BAR;18 7-AUG-2007 14:44:52.69
    > > > FOO.BAR;17 7-AUG-2007 14:44:51.57
    > > > FOO.BAR;16 7-AUG-2007 14:44:50.87
    > > > FOO.BAR;15 7-AUG-2007 14:44:48.31
    > > > FOO.BAR;14 7-AUG-2007 14:44:47.52
    > > > FOO.BAR;13 7-AUG-2007 14:44:46.96
    > > > FOO.BAR;12 7-AUG-2007 14:44:46.37
    > > > FOO.BAR;11 7-AUG-2007 14:44:45.72
    > > > FOO.BAR;10 7-AUG-2007 14:44:44.24 ! Not matching
    > > > FOO.BAR;9 7-AUG-2007 14:44:43.24 ! Matching
    > > > FOO.BAR;8 7-AUG-2007 13:01:12.37 ! Matching

    >
    > > > Total of 12 files.
    > > > $ purge foo.bar /before=14:44:44 /log
    > > > %PURGE-I-FILPURG, EISNER$DRA3:[DECUSERVE_USER.BRIGGS]FOO.BAR;9 deleted

    > (0
    > > > blocks
    > > > )
    > > > %PURGE-I-FILPURG, EISNER$DRA3:[DECUSERVE_USER.BRIGGS]FOO.BAR;8 deleted

    > (0
    > > > blocks
    > > > )
    > > > %PURGE-I-TOTAL, 2 files deleted (0 blocks)
    > > > $

    >
    > > Yes, and the logic is:

    >
    > > FOO.BAR;19 7-AUG-2007 14:44:53.51 !new file; keep highest version;
    > > count=1
    > > FOO.BAR;18 7-AUG-2007 14:44:52.69 !no match; skip
    > > FOO.BAR;17 7-AUG-2007 14:44:51.57 !no match; skip
    > > FOO.BAR;16 7-AUG-2007 14:44:50.87 !no match; skip
    > > FOO.BAR;15 7-AUG-2007 14:44:48.31 !no match; skip
    > > FOO.BAR;14 7-AUG-2007 14:44:47.52 !no match; skip
    > > FOO.BAR;13 7-AUG-2007 14:44:46.96 !no match; skip
    > > FOO.BAR;12 7-AUG-2007 14:44:46.37 !no match; skip
    > > FOO.BAR;11 7-AUG-2007 14:44:45.72 !no match; skip
    > > FOO.BAR;10 7-AUG-2007 14:44:44.24 !no match; skip
    > > FOO.BAR;9 7-AUG-2007 14:44:43.24 !Match; incr count;
    > > count.gt.keep; delete
    > > FOO.BAR;8 7-AUG-2007 13:01:12.37 !Match; incr count;
    > > count.gt.keep; delete

    >
    > > If you added: /KEEP=2 only FOO.BAR;8 would be deleted. /KEEP=3 and
    > > nothing would be deleted.

    >
    > Aha! ...but that's illogical. No wonder folks are conflicted.



    Makes you wonder why the HP folks have been so silent on this (and not
    just here.) Seems like *someone* in-the-know would explain it if there
    is an explanation. Do you suppose there's been just such a debate as
    this going on internally? Is there a purge-gate cover-up conspiracy?
    (and JF's door opens.) Or, does no one in HP see it as an issue
    worth discussing?