Copy a resource definition, either within the same group or to a different group.
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.
The COPY command accepts generic group names, both on the GROUP option and on the TO option, subject to the following rules:
You can use the asterisk (*) symbol to copy from generically named groups to other generically named groups or from generically named groups to a specific group, as shown in topic Examples.
The DFHCSDUP output listing tells you which definitions were copied, and what happened if duplicates were found.
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)
Back to full list of commands: Resource management utility DFHCSDUP commands