DELETE CHANNEL

Delete a named channel and all the containers that are in it.

DELETE CHANNEL

Read syntax diagramSkip visual syntax diagramDELETE CHANNEL( data-value)

Conditions: CHANNELERR

This command is threadsafe.

Description

DELETE CHANNEL deletes the specified channel and all the containers that are in it. When you delete a channel and its containers:
  • Any data that is in the containers is discarded.
  • All storage that relates to the channel and to its containers is released.
The application program that issues the DELETE CHANNEL command must be the program that owns the channel. The program that owns the channel is the program that created the channel by naming it on one of the following commands:
  • LINK PROGRAM CHANNEL
  • MOVE CONTAINER CHANNEL TOCHANNEL
  • PUT CONTAINER CHANNEL
  • PUT64 CONTAINER
  • RETURN TRANSID CHANNEL
  • START TRANSID CHANNEL
  • XCTL PROGRAM CHANNEL
  • WEB RECEIVE TOCHANNEL
  • WEB CONVERSE TOCHANNEL
An application program cannot delete the following channels:
  • The current channel for the application program, that is, the channel with which the program was invoked.
  • Any channel that the application program did not create.
  • Any channel that is read-only.
  • The transaction channel DFHTRANSACTION.

Options

CHANNEL(data-value)
Specifies the 1–16 character name of the channel that is to be deleted. Every container that is owned by the channel is deleted, and the channel itself is deleted.

Conditions

122 CHANNELERR
RESP2 values:
2
The channel specified on the CHANNEL option could not be found.
3
The channel specified on the CHANNEL option is a read-only channel.
4
The channel specified on the CHANNEL option is the current channel.
5
The channel specified on the CHANNEL option is the transaction channel.
6
The channel specified on the CHANNEL option is not owned by the calling program.