Using CMCI to create a resource definition

Create a BAS or CSD resource definition using the CICS Management Client Interface (CMCI).

Before you begin

You must have a connection with the CMCI; for more information, see .

About this task

Complete the following steps to create a resource definition using the CMCI:

Procedure

  1. Use a request with an HTTP POST method to create a resource definition.
    For more information about POST requests, see CICS® management client interface POST requests.
  2. Specify the URI for the request.
    • If you are creating a BAS resource and you specify a SCOPE in the URI, it is ignored.
    • If you are creating a CSD resource, specify the SCOPE in the URI. The SCOPE must be the CICS system in which you are creating the resource.
    For more information about specifying the URI for a POST request, see CICS management client interface POST request URI.
  3. Add an XML body containing the parameters and attributes for the resource.
    The XML body comprises a <create> element inside a <request> element.
    • If you are creating a BAS resource, you must include a defver attribute in the XML body.
    • If you are creating a CSD resource, you must specify the CSD parameter and a CSD group attribute in the XML body. Do not include a defver attribute if you are creating a CSD resource.

Example

The following example shows you what to send to the CMCI to create a BAS transaction definition.
POST http://exampledomain.com:12345/CICSSystemManagement/
     CICSDefinitionTransaction/<CONTEXT>/

<request>
   <create>
      <attributes name="NAME" defver="1" program="test"/>
   </create>
</request>
This example shows what to send to the CMCI to create a CSD transaction definition. Note that the CSD parameter and the csdgroup attribute are added to the XML, and that the defver attribute is excluded.
POST http://exampledomain.com:12345/CICSSystemManagement/
     CICSDefinitionTransaction/<CONTEXT>/<SCOPE>/

<request>
   <create>
      <parameter name="CSD"/>
      <attributes name="resourceName" program="test" csdgroup="CSDGR"/>
   </create>
</request>
Both the examples, creating a BAS resource definition and creating a CSD resource definition, return a similar output when they complete successfully. A successful create returns a CICSPlex SM API response message that contains api_response1="1024" and api_response1_alt="OK" as shown:
<response xmlns:...>
   <resultsummary api_response1="1024" api_response1_alt="OK".. />
   <records>
         ...
   </records>
</response>