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 Setting up CMCI.

About this task

Use a POST request to create a resource definition. For the request, specify the URI and an XML body containing the parameters and attributes for the resource, as instructed in the Procedure below.

For information about POST requests, see CMCI POST requests.

Procedure

  1. Specify the URI for the request, following the instructions in CMCI POST request URI.
    Note:
    • If you are creating a BAS resource, the SCOPE parameter, if specified in the URI, 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.
  2. Add an XML body containing the parameters and attributes for the resource.
    The XML body comprises a <create> element inside a <request> element. Specify the attributes of the new resource in the <create> element.

    For information about CMCI XML elements, see CMCI XML.

    Note:
    • 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 csdgroup attribute in the XML body. Do not include a defver attribute.

Example

The following example shows how 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 how 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 below:
<response xmlns:...>
   <resultsummary api_response1="1024" api_response1_alt="OK".. />
   <records>
         ...
   </records>
</response>