PURGE



PURGE

     Deletes one or more files from the system.

SYNTAX


PURGE filereference[,TEMP]

[ [;ONLOCKWORD={SELECT} ]
{SKIP}

[ [;ONERROR=] {CONTINUE} ]
{QUIT }

[ {;NOAUTOLOCKWORD} ]
{;AUTOLOCKWORD}

[ {;CONFIRM } ]
{;NOCONFIRM }
{;CONFIRMALL}

[ {;SHOW } ]
{;NOSHOW }

[ {;SHOWERRORS } ]
{;NOSHOWERRORS }


PARAMETERS


filereference Actual file designator of file to be deleted, in
MPE or HFS syntax. If filereference does not
begin with a dot (.) or a slash (/), it is parsed
according to MPE syntax and has the form:

filename[/lockword][.groupname[.acctname]]

If the filename begins with a dot or a slash, it
is parsed according to HFS syntax.

To delete the file, you must have WRITE access to
it.

TEMP Indicates that the file is a temporary file in the
job/session temporary file domain. You must enter
the TEMP parameter to delete a temporary file. The
default is that a permanent file is assumed.

SELECT Directs PURGE to delete files with lockwords.

SKIP Directs PURGE to skip files with lockwords, and
not delete them.

CONTINUE Directs PURGE to continue execution until the last
file is deleted regardless of whether or not it
encounters an error. CONTINUE is the default.

QUIT Directs PURGE to quit execution when it encounters
an error and sets the CIERROR variable to the last
execution error.

AUTOLOCKWORD Directs PURGE to look up and resolve file lockwords
automatically. Users with system manager (SM)
capability can specify AUTOLOCKWORD for all files
on the system. Users with account manager (AM)
capability can specify AUTOLOCKWORD for all files
within their account.

NOAUTOLOCKWORD Requires the user to specify a file's lockword
before the file is purged. This is the default.

CONFIRM Requires the user to validate the purge. Respond
"YES" to purge the file; respond "NO" or press
[Break] to retain it. CONFIRM is the default for
sessions, unless filereference specifies one file.

NOCONFIRM Directs PURGE to delete files without user
confirmation. NOCONFIRM is the default for jobs
and when filereference specifies one file.

CONFIRMALL Requires user confirmation on each file before
the purge is executed. Respond "YES" to purge
the file, "NO" or [Return] to retain the file,
and "QUIT" or [Break] to stop the command. The
CONFIRMALL option is ignored in jobs.

SHOW Displays the name of each successfully purged file.

NOSHOW Suppresses the display of each successfully
purged file. NOSHOW is the default.

SHOWERRORS Displays each lower-level error which prevents a
file from being deleted. The name of the file is
shown, followed by the error message.

NOSHOWERRORS Suppresses the display of low-level errors.
NOSHOWERRORS is the default.

OPERATION

     The PURGE command deletes one or more disk files from the system.
     You cannot use PURGE to delete a directory including ROOT, GROUP,
     or ACCT. If filename refers to a directory, you will get an error.

     When you use wildcard characters to delete multiple files, you
     have several options for controlling the purge process:

     o  use the ONLOCKWORD parameter to skip or delete files with
        lockwords
     o  use the ONERROR parameter to choose how to handle errors
     o  use the AUTOLOCKWORD parameter to have the system automatically
        lookup and resolve file lockwords
     o  use the CONFIRM options to determine whether or not you must
        okay the removal of each file

     In addition, you can use the SHOW and SHOWERROR parameters to
     control how much information the system displays during the
     purge operation.

     If the volume set on which the file(s) reside is not mounted,
     PURGE generates an implicit mount request. Once the operator
     mounts the volume set, the purge will proceed.

     If the file does not exist in the domain specified (temporary
     or permanent), you will get an error.

     You may use the PURGE command to delete a non-private spoolfile
     and all of its links to the spooler print queues.  To do so, you
     must specify the fully-qualified name of the spool file including
     its group and account in the form "filename.OUT.SPOOL".  Once
     you purge the spoolfile, it will not print.

     You may issue the PURGE command from a session, job, program, or
     in BREAK.  When the filename is wildcarded, this command is  breakable.


EXAMPLE(S)

     To delete the permanent file PFILE, enter:

        PURGE PFILE

     To delete the temporary file TFILE , enter:

        PURGE TFILE;TEMP

     To delete the file called posix/DOC/print.doc in the Current
     Working Directory (CWD), enter:


        PURGE ./posix/DOC/print.doc

     To delete multiple files using wildcards, enter:

        PURGE /users/jeff/bin/FILES/file@
        3 FILES matched
        Continue PURGE? (YEs/NO) yes
        3 selected.  3 succeeded.  0 failed.

     To delete multiple files interactively using wildcards, use
     the CONFIRMALL option to delete a number of files, one at a
     time, in an interactive mode so that you can skip a file or stop
     the delete operation.  For example, to delete selected files
     that begin with the string "file" followed by additional
     characters, enter:

        PURGE /users/jeff/bin/FILES/file@; CONFIRMALL
        3 FILES matched
        /users/jeff/bin/FILES/file1 ? (NO/YES/QUIT) yes
        /users/jeff/bin/FILES/file2 ? (NO/YES/QUIT) no
        /users/jeff/bin/FILES/file3 ? (NO/YES/QUIT) yes
        2 selected.  2 succeeded.  0 failed.

     Type "q","quit", or press the BREAK key if you decide to stop
     the PURGE command completely.

     The following example shows you how to delete all log files within
     your current working directory that start with log, followed by any
     number from 0 - 9 (#), followed by any number of alphanumeric
     characters (@).

        PURGE log#@
        10 FILES matched
        Continue PURGE?  (YES/NO) yes
        10 selected.  9 succeeded.  1 failed.

     Since the PURGE command does not remove the currently opened log
     file, the command always returns "1 failed".


ADDITIONAL INFORMATION

Commands:   ALTSEC, BUILD, LISTFILE, LISTSPF, SAVE