Contents Publish Package Interface Previous Next

PACKAGE_DESTROY

Deletes a package.

Syntax

CALL PACKAGE_DESTROY(packageId, rc);

packageId
Numeric, input.
Identifies the package to be deleted.

rc
Numeric, output.
Receives a return code.

Details

If the queue transport is used, the package is removed from the queue, along with all messages that are associated with the package. If the package contains nested packages, all entries that are contained within the nested packages as are also removed from the queue. If the archive transport is used, the archive is deleted.

The PACKAGE_DESTROY CALL routine does not support package identifiers that represent nested packages, which are returned by way of the RETRIEVE_NESTED CALL routine. The PACKAGE_DESTROY CALL routine supports only top-level package identifiers, which are returned by PACKAGE_FIRST and PACKAGE_NEXT.

The following example removes a package from a queue.

rc=0; 
CALL PACKAGE_DESTROY(packageId,  rc);

See Also

Contents Publish Package Interface Previous Next