The DFHCSDUP COPY command

Copy a resource definition, either within the same group or to a different group.
Note: Single resources cannot be copied as in the CEDA version of the COPY command.
Read syntax diagramSkip visual syntax diagram
COPY syntax

>>-Copy--Group--(--groupname1--)--To--(--groupname2--)---------->

>--+---------+--FRomcsd--(--ddname--)--------------------------><
   +-Replace-+                          
   '-MErge---'                          

Description

The COPY command copies all the resource definitions in groupname1 to groupname2. The group to be copied (groupname1) can be on the primary CSD, or it can be on the CSD file specified by the FROMCSD parameter.

The group is copied to the group named on the TO parameter (groupname2) in the primary file. If this group already exists, the definitions from the source group (groupname1) are added to those already in the groupname2 group. If the group specified on the TO parameter does not already exist, a new group of that name is created. However, if duplicate definitions exist in the two groups, the whole copy operation fails unless you specify REPLACE or MERGE to indicate how duplicates should be handled.

Options

FRomcsd(ddname)
specifies the ddname of the secondary CSD file from which you are copying groupname1.
Group(groupname1)
specifies the name of the group to be copied. You can specify a generic name by using an asterisk (*). See Generic naming in the COPY command for details.
MErge
If groupname2 already exists and duplicate definitions occur, the original definitions in groupname2 are preserved.
Replace
If groupname2 already exists and duplicate definitions occur, the definitions in groupname1 replace those in groupname2.
To(groupname2)
specifies the name of the group to which the definitions are copied. If you are copying from another CSD file, you can give this group the same name as the one you are copying from. You can specify a generic name by using an asterisk (*). See Generic naming in the COPY command for details.

Examples

The following example copies a group named GA001 to a group named GA002, which already exists, replacing any duplicate resource definitions with those in group GA001.
COPY GROUP(GA001) TO(GA002) REPLACE
The following example copies group GA003 to group GA004, but if any duplicate definitions occur, preserves the group GA004 definitions.
COPY GROUP(GA003) TO(GA004) MERGE
The following example copies all the CICS®-supplied groups to user-named groups with a prefix of USR, with the result that DFHOPER becomes USROPER, DFHSTAND becomes USRSTAND, and so on.
COPY GROUP(DFH*) TO(USR*)
The following example copies every group starting with ABCD to the group called NEWGROUP:
COPY GROUP(ABCD*) TO(NEWGROUP)