CMCI DELETE requests

The CICS® management client interface (CMCI) uses the HTTP DELETE method to remove resources from the data repository, or to discard installed resources from CICS or CICSPlex® SM.

The client forms a DELETE request using an HTTP header comprised of the following parts:
  • The method name, in this case DELETE
  • The URI that identifies the resources to be deleted
  • The HTTP version
  • Authorization credentials if required

DELETE requests can operate on either installed resources or on definitional resources. The interface constructs a CICS DISCARD command when operating on operational resources, and a CICSPlex SM REMOVE command when operating on definitional resources.

For example, to delete all transaction definitions in CICSplex PLEX1 that have a name beginning with TR and a program beginning with P, the client constructs the following HTTP header:
DELETE /CICSSystemManagement/CICSDefinitionTransaction/PLEX1?CRITERIA=NAME%3DTR%2A%20
AND%20PROGRAM%3DP%2A HTTP/1.1
Host: example.com:23792
Authorization: Basic RlJFRDpQQVNTVzBSRA==
The initial line has three parts, separated by spaces:
  • The method name
  • The request URI, which is specified as an absolute path that begins /CICSSystemManagement/ immediately followed by the external name that identifies the resource together with the parameters and filters that determine which instances of that resource are to be deleted. To make the URI suitable for processing by the CICS management client interface, the client replaces certain restricted characters such as spaces and asterisks with escape sequences.

    See CMCI DELETE request URI for a detailed description of the DELETE request URI.

  • The HTTP version, which, when connecting to the CICS management client interface, is always HTTP/1.1

The second line identifies the host name and port number of the target system separated by a colon as specified in the URI. This line ends with a carriage return, followed by a line-feed.

The optional third line contains authorization credentials. If your system is running with the CICS system initialization parameter SEC as YES, you must supply a user ID and password in base-64 in a basic authentication header. In this example the user ID is FRED and the password is PASSWORD.

The HTTP header is then finalized by a final carriage return and line-feed on a separate line.

Response to a DELETE request

On the completion of a DELETE request, the client receives a response from the CMCI made up of an HTTP header, and an XML feed containing a result summary and details of the deleted resources.

The header consists of an HTTP response code, the date and time, and details of the server and content type. The following example shows the header for a successful DELETE request:
HTTP/1.1 200 OK
Cache-Control: no-store
Date: Tue, 02 Jun 2009 14:51:37 GMT
Server: IBM_CICS_Transaction_Server (zOS)
Content-Type: application/xml; charset=UTF-8
Transfer-Encoding: chunked 

See CICS management client interface error messages for a description of all response codes.

The body of the response consists of a <response> root element containing a <resultsummary> element displaying summarized information about the request, for example:
<response xmlns="http://www.ibm.com/xmlns/prod/CICS/smw2int" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.ibm.com/xmlns/prod/CICS/smw2int 
http://example.com:30061/CICSSystemManagement/schema/CICSSystemManagement.xsd" 
version="1.0" connect_version="0410">
<resultsummary api_response1="1024" api_response1_alt="OK"
api_response2="0" api_response2_alt="" recordcount="1" successcount="1" />
</response>

See <response> element for more information about the XML elements in the response to a DELETE request.

Security considerations

When you are using HTTP methods, be aware that some firewalls do not allow HTTP PUT or DELETE traffic through the firewall because of security considerations. To accommodate this restriction, you can use a CMCI POST request to tunnel a DELETE request through a POST request.