Add

Adds objects to a container object.

You can use the Add command to:

See the related Remove command.

Request format

Adding resource definitions to a ResGroup:

<CCV510>
  <Add>
    <LocationCriteria>
      <LocationName> location_name </LocationName>
      <LocationType> CConfig | Context | CSD </LocationType>
    </LocationCriteria>

    <ObjectCriteria>  1 
      <ListCount> element_count </ListCount>
      <ListElement>
        <DefA>
          <ObjGroup> resource_group </ObjGroup>
          <ObjType> resource_type </ObjType>
          <ObjName> resource_name </ObjName>
          <ObjDefVer> definition_version </ObjDefVer>  2 
        </DefA>
      </ListElement>
    </ObjectCriteria>
 
    <InputData>  3 
      <ContainerName> object_name </ContainerName>
      <ContainerType> ResGroup </ContainerType>
    </InputData>
  </Add>
</CCV510>

Adding ResGroups to a ResDesc:

<CCV510>
  <Add>
    <LocationCriteria>
      <LocationName> location_name </LocationName>
      <LocationType> CConfig | Context | CSD </LocationType>
    </LocationCriteria>
 
    <ObjectCriteria>  1 
      <ListCount> element_count </ListCount>
      <ListElement>
        <GrpA>
          <ObjType> ResGroup </ObjType>
          <ObjName> resource_name </ObjName>
        </GrpA>
      </ListElement>
    </ObjectCriteria>
 
    <InputData>  3 
      <ContainerName> object_name </ContainerName>
      <ContainerType> ResDesc </ContainerType>
    </InputData>
  </Add>
</CCV510>

Packaging resource definitions:

<CCV510>
  <Add>
    <LocationCriteria>
      <LocationType> Repository </LocationType>
    </LocationCriteria>
    <ObjectCriteria>  1 
      <CConfig> CICS_configuration </CConfig>  4 
      <ListCount> element_count </ListCount>
      <ListElement>
        <KeyA>
          <ObjGroup> resource_group </ObjGroup>
          <ObjType> resource_type </ObjType>
          <ObjName> resource_name </ObjName>
        </KeyA>
      </ListElement>
 
      More list elements…
 
    </ObjectCriteria>
 
    <InputData>  3 
      <ContainerName> change_package_ID </ContainerName>
      <ContainerType> ChgPkg </ContainerType>
    </InputData>
 
  </Add>
</CCV510>

Packaging commands:

<CCV510>
  <Add>
    <LocationCriteria>
      <LocationType> Repository </LocationType>
    </LocationCriteria>
    <ObjectCriteria>  1 
      <CConfig> CICS_configuration </CConfig>  4 
      <ListCount> element_count </ListCount>
      <ListElement>
        <CmdAPost>
          <Command> Add | Remove | Delete </Command>
          <ObjGroup> resource_group </ObjGroup>
          <ObjType> resource_type </ObjType>
          <ObjName> resource_name </ObjName>
          <ObjDefVer> definition_version </ObjDefVer>  2 
          <TContainer> resource_group </TContainer>  5 
        </CmdAPost>
      </ListElement>
 
      More list elements…
 
    </ObjectCriteria>
 
    <InputData>  3 
      <ContainerName> change_package_ID </ContainerName>
      <ContainerType> ChgPkg </ContainerType>
    </InputData>
 
  </Add>
</CCV510>
 1 
<ObjectCriteria> identifies the objects that you want to add to the container (for example, the resource definitions that you want to package).
You can specify the object criteria in several ways:
  • To identify a single object, specify the contents of a single <ListElement>, but omit the <ListElement> start tag and the </ListElement> end tag. Omit the <ListCount> element. In the <Obj...> element values, do not use masking (wildcards).
  • To identify one or more objects, either:
    • Specify <ListCount> followed by one or more <ListElement>. Each <ListElement> must identify a object, with no masking.

      or

    • Specify the contents of a single <ListElement>, but omit the <ListElement> start tag and the </ListElement> end tag. Omit the <ListCount> element. In the <Obj...> element values, do not use masking (wildcards).

When adding to a ResGroup or a ResDesc, <LocationCriteria> refers to the location of the resource definitions. However, when packaging resource definitions or commands, <LocationCriteria> refers to the CICS® Configuration Manager repository, which is where the change package is stored. To specify the location of the resource definitions, or the CICS configuration associated with the commands, you use <CConfig> in <ObjectCriteria>.

 2 
When referring to a context-based resource definition, specify either <ObjDefVer> or <ObjGroup>. Specifying <ObjDefVer> enables you to refer to a specific version of a context-based resource definition, even when the resource definition is an orphan (does not belong to any ResGroup).
 3 
<InputData> identifies the container object: ResGroup, ResDesc, or change package.
 4 
<CConfig> identifies the CICS configuration that contains the resource definitions, or the CICS configuration associated with the commands, that you want to add to the change package.
 5 
<TContainer> ("target container") is relevant only when packaging an Add command. It identifies the ResGroup to which you want the resource definitions added.

Response format

<CCV510>
  <Add>
    <OutputData>
      <ReturnCode> return_code </ReturnCode>
      <ReasonCode> reason_code </ReasonCode>
      <TaskNo> CICS_task_number </TaskNo>
 
      <ListCount> element_count </ListCount>
      <ListElement>
        <ReturnCode> return_code </ReturnCode>
        <ReasonCode> reason_code </ReasonCode>
        <Command> Add | Remove | Delete </Command>  1 
        <ObjName> resource_name </ObjName>
        <ObjType> resource_type </ObjType>
        <ObjGroup> resource_group </ObjGroup>  2 
        <ObjDefVer> definition_version </ObjDefVer>
        <Config> CICS_configuration </Config>
        <TContainer> resource_group </TContainer>  3 
        <LocationName> CSD_DSN | context </LocationName>
      </ListElement>
 
      More list elements…
 
    </OutputData>
  </Add>
</CCV510>
 1 
The response contains <Command> only when packaging a command.
 2 
When adding a resource definition to a ResGroup, the response returns the details of the resource definition specified in the request object criteria: for example, <ObjGroup> in the response matches the <ObjGroup> in the request, not the <ContainerName> in the request.
 1 
The response contains <TContainer> only when packaging an Add command.

Security key

API command (READ access authority):

Read syntax diagramSkip visual syntax diagram
>>-prefix.ADD.object_type.location_type.location_name----------><

Resource definitions (ALTER access authority):

Read syntax diagramSkip visual syntax diagram
>>-prefix.target_CICS_config.group.type.name-------------------><

Examples

The following example adds a CONNDEF resource definition to a RESGROUP. The CONNDEF and the RESGROUP are stored in a context.

 

<CCV510>
   <ADD>
 
  <LocationCriteria>
    <LocationName> CCVPLEXA </LocationName>
    <LocationType> CONTEXT </LocationType>
  </LocationCriteria>
 
  <ObjectCriteria>
    <ObjName> M001 </ObjName>
    <ObjGroup> QAAADDPR </ObjGroup>
    <ObjType> CONNDEF </ObjType>
  </ObjectCriteria>
 
  <InputData>
    <ContainerName> QAAADD01 </ContainerName>
    <ContainerType> RESGROUP </ContainerType>
  </InputData>
 
   </ADD>
</CCV510>

The following example adds a RESGROUP to a RESDESC.

 

<CCV510>
   <ADD>
 
  <LocationCriteria>
    <LocationName> CCVPLEXA </LocationName>
    <LocationType> CONTEXT </LocationType>
  </LocationCriteria>
 
  <ObjectCriteria>
    <ObjType> RESGROUP </ObjType>
    <ObjName> QAAADDPR </ObjName>
  </ObjectCriteria>
 
  <InputData>
    <ContainerName> QAACONNA </ContainerName>
    <ContainerType> RESDESC </ContainerType>
  </InputData>
 
   </ADD>
</CCV510>

Reference Reference

Feedback


Timestamp icon Last updated: Friday, 7 February 2014


http://pic.dhe.ibm.com/infocenter/cicsts/v5r1/topic///ccv-api-cmd-add.htm