DISCARD PROGRAM

Remove the definition of a program, map set, or partition set.

Syntax

DISCARD PROGRAM

Read syntax diagramSkip visual syntax diagramDISCARD PROGRAM( data-value)

Conditions: INVREQ, NOTAUTH, PGMIDERR

NOHANDLE, RESP, and RESP2 are common options that can be added to all EXEC CICS commands to process error conditions. They are not explicitly included in the command syntax diagram and option descriptions. For information about these common options and EXEC CICS command syntax, see EXEC CICS command format and programming considerations.

This command is threadsafe.

Description

The DISCARD PROGRAM command removes the definition of a program, map set, or partition set (a load module resource) from the local CICS® system, so that the system no longer has access to the resource. It revokes the earlier installation of a PROGRAM, MAPSET, or PARTITIONSET definition of the same name.

You cannot discard a module that is being executed or otherwise used by a task. Definitions supplied by CICS (modules whose names begin with DFH) and modules defined as user-replaceable (such as autoinstall programs) are also ineligible.

You cannot discard a PROGRAM resource that is created by a BUNDLE resource. To discard the program, you must disable and discard the BUNDLE resource. See BUNDLE resources for more information.

See Discarding resource definitions for general information about discards.

Options

PROGRAM(data-value)
Specifies the 8-character name of the program, map set, or partition set that is to be removed.

Conditions

INVREQ
RESP2 values:
1
The resource cannot be discarded because its name begins with DFH.
11
The resource definition is currently in use.
15
The resource cannot be discarded because it is a user-replaceable module.
300
The resource cannot be discarded because it was installed by a BUNDLE resource.
301
You specified an operation that is invalid for a PROGRAM that has been loaded from a CICS bundle defined LIBRARY.
NOTAUTH
RESP2 values:
100
The user associated with the issuing task is not authorized to use this command.
101
The user associated with the issuing task is not authorized to access this particular resource in the way required by this command.
PGMIDERR
RESP2 values:
7
The resource definition cannot be found.