Copy

Copies resource definitions between groups or CICS® configurations.

Request format

<CCV510>
  <Copy>
    <LocationCriteria>  1 
      <LocationName> location_name </LocationName>
      <LocationType> CConfig | Context | CSD </LocationType>
    </LocationCriteria>
 
    <ObjectCriteria>
      <ListCount> element_count </ListCount>  2 
      <ListElement>  3 
          <ObjName> resource_name </ObjName>
          <ObjGroup> resource_group </ObjGroup>
          <ObjType> resource_type </ObjType>
      </ListElement>
 
      More list elements…
 
    </ObjectCriteria>
 
    <InputData>  1 
      <TargetLocationName> location_name </TargetLocationName>
      <TargetLocationType>  CConfig | Context | CSD </TargetLocationType>
      <TargetGroup> resource_group </TargetGroup>  4 
    </InputData>
 
    <ProcessParms>
      <Replace> No | Yes </Replace>  5 
    </ProcessParms>
  </Copy>
</CCV510>
 1 
<LocationCriteria> identifies the source location of the resource definitions that you want to copy.

<InputData> identifies the target location (where you want to copy the resource definitions to). <TargetLocationName> and <TargetLocationType> are required, even if they specify the same location as <LocationName> and <LocationType>.

If the source and target locations are the same, then you must specify a target group (see  4 ).

 2 
The element_count must match the number of list elements.
 3 
Each <ListElement> must uniquely identify a resource definition in the source location. You must specify the name, group, and type of each resource definition with no wildcards.

Each list element is treated individually. For example, if a list element identifies a resource definition that already exists at the target location, and you leave <Replace> at its default value of No, and you do not specify a different target group, then that resource definition is not copied, and the Copy command moves on to the next list element.

 4 
If the source and target locations are the same, then <TargetGroup> is required. Otherwise, <TargetGroup> is optional:
  • If specified, <TargetGroup> identifies the group name that is assigned to the resource definition at the target location.
  • If omitted, the target group name defaults to the source group name specified by <ObjGroup>.

If this group does not exist at the target location, then the Copy command creates it.

 5 
<Replace> is optional. It specifies whether or not to overwrite existing resource definitions at the target location. If omitted, the default is No.

Response format

<CCV510>
  <Copy>
    <OutputData>
      <ReturnCode> return_code </ReturnCode>  1 
      <ReasonCode> reason_code </ReasonCode>
      <TaskNo> CICS_task_number </TaskNo>
 
      <ListCount> element_count </ListCount>
      <ListElement>  2 
        <ObjName> resource_name </ObjName>
        <ObjGroup> resource_group </ObjGroup>
        <ObjType> resource_type </ObjType>
        <Config> CICS_configuration </Config>
        <LocationName> location_name </LocationName>
        <ReturnCode> return_code </ReturnCode>  1 
        <ReasonCode> reason_code </ReasonCode>
      </ListElement>
 
      More list elements…
 
    </OutputData>
  </Copy>
</CCV510>
 1 
The output data contains a return code and a reason code for the command overall, and also for each list element. The overall return code and reason code are from the list element with the highest return code.
 2 
Each list element in the response matches a list element in the request, in the same order. The resource definition name, group, and type in the response reflects the resource definition at the source location, not the copied resource definition at the target. In particular, <ObjGroup> in the response reflects the <ObjGroup> in the request, not the <TargetGroup>.

Security key

API command (READ access authority):

Read syntax diagramSkip visual syntax diagram
                                                      (1)   
>>-prefix.CPY.object_type.location_type.location_name----------><

Notes:
  1. location_type and location_name refer to the target location (where the object is being copied to).

Resource definitions:

For the source resource definition (READ access authority):

Read syntax diagramSkip visual syntax diagram
>>-prefix.source_CICS_config.source_group.type.name------------><

For the target resource definition (ALTER access authority):

Read syntax diagramSkip visual syntax diagram
>>-prefix.target_CICS_config.target_group.type.target_name-----><

If the source CICS configuration refers to an export file, then no security check is performed for the source resource definition.


Reference Reference

Feedback


Timestamp icon Last updated: Friday, 1 November 2013


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