The DISCARD command allows you to remove an installed resource definition and its corresponding catalog entry from an active CICS system.
DISCARD does not affect the CICS system definition (CSD) file, and you can therefore reinstate the resource using CEDA INSTALL(resourcename). DISCARD commands require ALTER access to the resource to provide similar security to that for SET commands (which use UPDATE access). You cannot discard resources that are currently in use or are CICS owned resources (beginning with "DFH" or "C").
You can discard the following resource types:
(Programming information about FEPI commands is in the CICS® Front End Programming Interface User’s Guide.)
There are two ways to discard a resource:
CEMT DISCARD resourcetype(resourcename)
CEMT INQUIRE resourcetype
and a screen similar to Figure 61 appears. Use the carriage
return key to move the cursor to the beginning of the line for the resource
or resources you want to discard, and type "D" as shown and then press
ENTER.IN PROG STATUS: RESULTS - OVERTYPE TO MODIFY D Prog(ABCDTASK) Len(0002936) Ass Pro Ena Pri Ced Res(000) Use(000000) Prog(DFHACP ) Len(0008232) Ass Pro Ena Pri Res(001) Use(000002) Any Cex Ful Prog(DFHAKP ) Len(0005672) Ass Pro Ena Pri Res(000) Use(000001) Bel Cex Ful Prog(DFHAMP ) Len(0108432) Ass Pro Ena Pri Res(000) Use(000009) Any Cex Ful Prog(DFHAPATT) Len(0000632) Ass Pro Ena Sha Res(005) Use(000018) Any Cex Ful Prog(DFHBRCP ) Len(0000000) Ass Pro Ena Pri Res(000) Use(000000) Bel Cex Ful Prog(DFHCCNV ) Len(0000000) Ass Pro Ena Pri Res(000) Use(000000) Any Cex Ful D Prog(ERRTASK ) Len(0000448) Ass Pro Ena Pri Res(000) Use(000000)
CEMT DISCARD .-------------------------. V | >>-CEMT Discard----+---------------------+-+------------------->< +-Autinstmodel(value)-+ +-CONnection(value)---+ +-CORbaserver(value)--+ +-DB2Conn-------------+ +-DB2Entry(value)-----+ +-DB2TRAN(value)------+ +-DJar(value)---------+ +-DOctemplate(value)--+ +-Enqmodel(value)-----+ +-FENode(value)-------+ +-FEPool(value)-------+ +-FEPropset(value)----+ +-FETarget(value)-----+ +-FIle(value)---------+ +-JModel(value)-------+ +-JOurnalname(value)--+ +-PArtner(value)------+ +-PIpeline(value)-----+ +-PROCesstype(value)--+ +-PROFile(value)------+ +-PROGram(value)------+ +-Requestmodel(value)-+ +-TCLass(value)-------+ +-TCPipservice(value)-+ +-TDqueue(value)------+ +-TErminal(value)-----+ +-TRansaction(value)--+ +-TSmodel(name)-------+ +-Urimap(name)--------+ '-Webservice(name)----'
For deletion to be successful:
Other types of connection can be discarded, even if there is recovery work outstanding for them. However, it is recommended that you do not discard them if there is. You can use the INQUIRE CONNECTION RECOVSTATUS command to check.
In some unusual circumstances, it is possible for deletion of an LU61 connection to fail, even though the connection is out of service, because its sessions are still in-service. If this happens, set the connection INSERVICE, then OUTSERVICE, then reissue the DISCARD command.
If any of the beans installed in the named CorbaServer are in use when the DISCARD command executes, the state of the CorbaServer turns to DISCARDING. No new work is accepted. When all outstanding work has completed, the CORBASERVER definition is removed.
Copies of deployed JAR files are deleted from the CorbaServer's shelf, together with any other files on the shelf that belong to the CorbaServer. The CorbaServer’s shelf directory is deleted.
As well as the DJAR definition, the shelf copy of the deployed JAR file and the beans it contains are also removed from the system. The current set of JVM instances are marked for termination, so that each JVM instance will not be reused after it terminates. New JVM instances load all their classes and do not use old versions of classes whose bytecodes have been replaced.
Passivated stateful session bean instances are not deleted by this operation because, in a workload-managed CICS EJB server, they could be activated by other AORs.
References to the homes of enterprise beans in the deployed JAR file are not retracted from the namespace because other AORs might still have the homes installed. However, before discarding a deployed JAR file from the last AOR in which it is installed, you might wish to issue a PERFORM DJAR RETRACT command to retract references to home interfaces.
To discard journals defined with a numeric identifier for auto-journaling or forward recovery logs, specify the journal name as DFHJnn, where nn is the journal number in the range 1-99.
Any future reference to the journal name will cause it to be reinstalled using the journal model resource in effect at that time.
Only terminals that use VTAM as an access method or consoles are eligible for deletion. Terminals that represent sessions cannot be deleted with DISCARD TERMINAL; use the DISCARD CONNECTION command instead.