Previous Topic: The Delete Package ActionNext Topic: The Deny Package Action


Delete Package Syntax

►►─ DELEte PACkage ─ package-id ──────────────────────────────────────────────►
 ►─┬──────────────────────────────────────────────────────────┬─ . ───────────►◄
   └─ OPTions ─ ¤ ─┬────────────────────────────────────┬─ ¤ ─┘
                   ├─ WHEre OLDer THAn ─ number ─ DAYS ─┤
                   └─┤ WHERE PACKAGE STATUS ├───────────┘

Expansion of WHERE PACKAGE STATUS

                                        ┌─────┬── , ─┬───────┐
                                        │     │      │       │
                                        │     └─ OR ─┘       │
►─ WHEre PACkage STATus ─┬──────┬ ───── ▼ ─┬─ ALLstate ────┬─┴────────────────┤
                         └─ IS ─┘          ├─ INEdit ──────┤
                                           ├─ INApproval ──┤
                                           ├─ DENied───────┤
                                           ├─ APPROVED─────┤
                                           ├─ INEXecution──┤
                                           ├─ EXECUTED─────┤
                                           ├─ EXECFailed───┤
                                           └─ COMMITTEd ───┘

DELETE PACKAGE package-id

The DELETE PACKAGE clause identifies the package you are deleting. You can use a fully specified, partially wildcarded or fully wildcarded package ID. If you wildcard the package ID, you must specify the WHERE PACKAGE STATUS IS clause. If you use a fully specified package ID, the WHERE PACKAGE STATUS IS and the WHERE OLDER THAN clauses are ignored.

OPTIONS

OPTION clauses allow you to further specify package actions.

WHERE OLDER THAN number DAYS-Use this clause to specify the minimum age of the packages you are deleting. A package must be older than the number of days you specify in order to delete it. This number of days is compared against the create date of the package to determine if the package meets the criterion of the WHERE OLDER THAN clause.

WHERE PACKAGE STATUS-This clause specifies the statuses of the packages you are deleting. You can only use this clause when you wildcard the package ID. If you do not specify the WHERE PACKAGE STATUS clause, the DELETE PACKAGE action deletes packages of any status type.

Example: Delete Package SCL

The following is an example of DELETE PACKAGE SCL. The SCL deletes all packages that begin with PAYROLLPKG, are older than 30 days, and are in the In-edit status.

DELETE  PACKAGE PAYROLLPKG*
    		OPTIONS WHERE OLDER THAN 30 DAYS
        WHERE PACKAGE STATUS IS INEDIT.