Add
Adds objects to a container object.
You can use the Add command to:
- Add resource definitions in a CICSPlex® SM data repository to a ResGroup (resource group).
- Add ResGroups to a ResDesc (resource description).
- Add resource definitions or commands to a change package. This is also known as "packaging" resource definitions or commands.
See the related Remove command.
Request format
Adding resource definitions to a ResGroup:
<CCV530>
<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>
</CCV530>
Adding ResGroups to a ResDesc:
<CCV530>
<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>
</CCV530>
Packaging resource definitions:
<CCV530>
<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>
</CCV530>
Packaging commands:
<CCV530>
<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>
</CCV530>
- 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 only one set of <ObjName>, <ObjGroup>, and <ObjType>, with no masking (wildcards). Do not specify <ListCount> or <ListElement>.
- To identify one or more objects, either:
- Specify <ListCount> followed by one or more
<ListElement>. Each <ListElement> must identify a
single object, with no masking.
or
- only one set of <ObjName>, <ObjGroup>, and
<ObjType> with masked values. Do not specify
<ListCount> or <ListElement>. The values can be any
combination of:
- Mask or specific value for the object name
- Mask or specific value for the object group
- Specific object type, or the value * or All to identify all object types (you cannot use masking to identify a subset of object types)
For example, to identify all program resource definitions beginning with the characters PAY, from all groups beginning with the characters FIN, specify:
<ObjectCriteria> <ObjName>PAY*</ObjName> <ObjGroup>FIN*</ObjGroup> <ObjType>PROGDEF</ObjType> </ObjectCriteria>
- Specify <ListCount> followed by one or more
<ListElement>. Each <ListElement> must identify a
single object, with no masking.
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
<CCV530>
<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>
</CCV530>
- 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):
>>-prefix.ADD.object_type.location_type.location_name----------><
Resource definitions (ALTER access authority):
>>-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.
<CCV530>
<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>
</CCV530>
The following example adds a RESGROUP to a RESDESC.
<CCV530>
<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>
</CCV530>