Use SessionDiscard to end the current session and to delete the object (message, job, etc.) associated with the session. SessionDiscard is accepted only for objects that are considered to be temporary in nature.
SessionDiscard may also be entered as SessionDisc[ard], SessDisc[ard], DiscardSess[ion], DiscSess[ion], or Disc[ard].
SessionDiscard has no operands.
Message Notes
Messages can be deleted with either SessionDiscard or MailDelete. SessionDiscard is not rejected in situations that prevent a message from being deleted. Instead, the session is ended and a warning message may be displayed.
JES Notes
JES jobs or JES data set groups can be deleted with either SessionDiscard or JobDelete. If the session was started with the DSET operand, SessionDiscard will not succeed because JES provides no facility to delete by data set. SessionDiscard deletes all data sets within the JES job that met the selection for the session. If the session selection was all SYSOUT, the entire JES job is deleted. If delete access to a JES job (or JES data set group) is rejected, the session is terminated but the JES job (or JES data set group) is not deleted. No message is given.
SessionDiscard sets last referenced job (and data sets).
POWER Notes
POWER jobs can be deleted with either SessionDiscard or JobDelete. SessionDiscard sets last referenced job. If delete access to a POWER job is rejected, the session is terminated but the POWER job is not deleted. An inadequate access level message is displayed.
SessionDiscard sets last referenced job.
Return Codes
OK Successful.
Examples
End the current session, and delete the object associated with the session:
=> disc